Android 如何设置新位置AutocompleteSupportFragment的样式

Android 如何设置新位置AutocompleteSupportFragment的样式,android,android-layout,Android,Android Layout,有没有关于如何设计这种样式的参考资料?我在开发者文档中没有找到任何东西。任何帮助都将不胜感激。首先,通过以下方式获取片段的视图: AutocompleteSupportFragment autocompleteFragment = (AutocompleteSupportFragment) getSupportFragmentManager().findFragmentById(R.id.autocomplete_fragment); View view = autoco

有没有关于如何设计这种样式的参考资料?我在开发者文档中没有找到任何东西。任何帮助都将不胜感激。

首先,通过以下方式获取片段的视图:

AutocompleteSupportFragment autocompleteFragment = (AutocompleteSupportFragment)
            getSupportFragmentManager().findFragmentById(R.id.autocomplete_fragment);
View view = autocompleteFragment.getView();
要获取放大镜图标的
ImageButton
视图,请执行以下操作:

  ImageButton searchButton = view.findViewById(com.google.android.libraries.places.R.id.places_autocomplete_search_button);
要获取编辑文本的
EditText
视图,在该视图中,他们将“搜索”作为提示:

  EditText editText = view.findViewById(com.google.android.libraries.places.R.id.places_autocomplete_search_input);