问题
I am an android newbie, so please go easy on me. I have just implement the google places auto complete field, https://developers.google.com/places/android-api/autocomplete .
The only thing I added to the view was this fragment which controls both a textInput, and a modal for the search results which emerges when the textInput gains focus.
<fragment
android:id="@+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"/>
The search input does not match my styling of nearby search fields. I want to adjust it, how do I do this? I have been trying to get the reference to the xml file that the autocomplete search bar is using.
Thank you for any help!
回答1:
You have to redefine their internal styles. For colors that could be:
<color name="place_autocomplete_search_text">@android:color/primary_text_dark</color>
<color name="place_autocomplete_search_hint">@android:color/secondary_text_dark</color>
来源:https://stackoverflow.com/questions/35618457/how-do-you-change-the-styling-of-a-fragment-google-place-autocomplete