Stack Overflow archive
0 score

How to use my own custom EditText layout as a searchView

score
0
question views
10.3K
license
CC BY-SA 3.0

I wrote this class to help with SearchView customization:

https://gist.github.com/jaredrummler/c408c9d897fd92d5d116

You could do something like this after inflating the menu in onCreateOptionsMenu:

java
SearchViewStyle.on(menu, R.id.your_search_id)
.setSearchPlateDrawableId(R.drawable.your_edit_text);

Originally posted on Stack Overflow. Public user contributions are licensed under Creative Commons Attribution-ShareAlike.