How to change text size in places autocompletefragment in android?

前端 未结 6 1758
失恋的感觉
失恋的感觉 2020-12-10 12:11

I am using the PlaceAutocompleteFragment that is provided by google in a project that I am working on right now. But the problem is I need to display the place name that I\'

6条回答
  •  暖寄归人
    2020-12-10 13:01

    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);
    

    UPDATED: 05/26/20

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

提交回复
热议问题