Default hint value of the autocomplete widget is Search
. How can this value be changed to a different String
?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Try out the below code:
PlaceAutocompleteFragment places= (PlaceAutocompleteFragment)getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);
EditText etPlace = (EditText)places.getView().findViewById(R.id.place_autocomplete_search_input);
etPlace.setHint("Your Text");
Hope this helps.