有没有关于如何设置样式的引用?我没有在开发人员文档中找到任何内容。任何帮助将不胜感激。
最佳答案
首先,通过以下方式获取 fragment 的 View :
AutocompleteSupportFragment autocompleteFragment = (AutocompleteSupportFragment)
getSupportFragmentManager().findFragmentById(R.id.autocomplete_fragment);
View view = autocompleteFragment.getView();
获取放大镜图标的 ImageButton
View :
ImageButton searchButton = view.findViewById(com.google.android.libraries.places.R.id.places_autocomplete_search_button);
获取 EditText
View ,将“Search”作为提示写入:
EditText editText = view.findViewById(com.google.android.libraries.places.R.id.places_autocomplete_search_input);
关于android - 我如何设计新地方 AutocompleteSupportFragment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56021363/