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\'
The autoCompleSupportFragment has an EditText Property. Which can be modified accordingly. The name of the editText is however not very clear. In my case, it was "a"
autoCompleteFragment.a.gravity = Gravity.START
so to modify the text size, i did:
autoCompleteFragment.a.textSize = 14.0f
Your screen shot shows that you set margin or padding at search icon and cancel icon. remove it so it make more space for text view.
You can also use autofittextview library(https://github.com/grantland/android-autofittextview) which will make text size according to your text view size.
Simplest
((EditText)findViewById(R.id.place_autocomplete_search_input)).setTextSize(10.0f);
in case of skadosh answer you need to first get instance of fragment.
Assuming your fragment in the Javacode is autocompleteFragment, you can use
autocompleteFragment.a.setTextSize(12.0f);
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
View fView = autocompleteFragment.getView();
Set Text, Hint Color & Size:
EditText etTextInput = fView.findViewById(R.id.places_autocomplete_search_input);
etTextInput.setTextColor(Color.WHITE);
etTextInput.setHintTextColor(Color.WHITE);
etTextInput.setTextSize(12.5f);
Set Search Custom Image:
ImageView ivSearch = fView.findViewById(R.id.places_autocomplete_search_button);
ivSearch.setImageResource(R.drawable.ic_search_white);
Set Search Text Clear Image:
ImageView ivClear = fView.findViewById(R.id.places_autocomplete_clear_button);
ivClear.setImageResource(R.drawable.ic_close_white);
Output: