Change color of Autosuggestbox in Android Studio

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Change color of Autosuggestbox in Android Studio



I'd like to change the layout and color of the suggestion box I get in my Google Maps-API based app in Android Studio. I have no idea whether I should look into the code of Google Maps or somewhere else.



the link contains an image with the suggestbox I'm talking about



This is the code of the TextView:


<AutoCompleteTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginRight="50dp"
android:layout_toRightOf="@+id/ic_magnify"
android:textSize="15sp"
android:textColor="#ecf0f1"
android:id="@+id/input_search"
android:background="@null"
android:imeOptions="actionSearch"
android:inputType="text"
/>



And I use the PlaceAutocompleteAdapter to autosuggest the possible locations.





That depends on how you implemented it. Please show us some codes. You can start by that SearchView. Then we'll be able to help you better. Also, this might help: stackoverflow.com/questions/27240200/…
– ʍѳђઽ૯ท
Aug 9 at 19:48



SearchView





@Mohsen I edited the question. I'm sorry I didn't know where to look so I could add any code. Hope you can do something more with this!
– Simon Kuhn
Aug 9 at 20:00





It's alright, you set the background @null. Could you change the color of this to for ex. : #FFFFFF and see what happens? This should make the background white.
– ʍѳђઽ૯ท
Aug 9 at 20:11



@null


#FFFFFF





@Mohsen No this doesn't seem to work. This background color refers to the background color of the textfield. Therefore this one is .@null. Any other suggestions?
– Simon Kuhn
Aug 9 at 21:45





I do not have a SearchView. I achieved the searching option with android:imeOptions="actionSearch". Also, I don't see how the link you provided could help me :(
– Simon Kuhn
Aug 10 at 9:27




1 Answer
1



Fixed the problem by styling the dropdown popup.
I added android:popupBackground="#2d3e50" to the AutoCompleteTextView-style which changed the color to the one
I needed.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

Creating a leaderboard in HTML/JS