且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在android中的地方自动完成片段中更改文本大小?

更新时间:2022-12-30 07:45:40

使用片段实例,您可以使用搜索框 EditText 更改字体大小和任何您想要的内容.这就是您需要的方式做

Using fragment instance you can change the font size and whatever you want with the Search box EditText.. this is how you need to do

// placeAutocompleteFragment - is my PlaceAutocompleteFragment instance
((EditText)placeAutocompleteFragment.getView().findViewById(R.id.place_autocomplete_search_input)).setTextSize(10.0f);

更新:05/26/20

看起来最新的 SDK 视图 ID 已更改为 R.id.places_autocomplete_search_input

Looks like in latest SDK view id is changed to R.id.places_autocomplete_search_input