I'm trying to implement search interface in actionbar like in Google Play Video App (https://play.google.com/store/apps/details?id=com.google.android.videos). I think it is SearchView widget but don't understand how do same customization: add up button inside it, set background, and expand the full width of actionbar
Asked
Active
Viewed 8,241 times
10
-
1Have you checked [this link](http://stackoverflow.com/questions/27556623/creating-a-searchview-that-looks-like-the-material-design-guidelines) ? – hrskrs Jun 11 '15 at 08:37
-
Possible duplicate of [How to style Android SearchView like in Google Play Store app?](https://stackoverflow.com/questions/38327504/how-to-style-android-searchview-like-in-google-play-store-app) – Vadim Kotov Jul 08 '19 at 09:40
3 Answers
3
-
3It's not been maintained for well over half a year and is formally discontinued. There are better alternatives now, such as https://github.com/lapism/SearchView and https://github.com/arimorty/floatingsearchview – user1214083 Jun 23 '16 at 05:03
0
Use a standalone Toolbar and set it with an elevation, then inflate your menu in it.
You can add this item to your menu:
<item android:id="@+id/menu_search"
android:title="@string/action_search"
android:icon="@drawable/abc_ic_search_api_mtrl_alpha"
pawesome:showAsAction="ifRoom|collapseActionView"
pawesome:actionViewClass="android.support.v7.widget.SearchView"/>

Earwin delos Santos
- 2,965
- 7
- 20
- 29
0
I'm using not bad library for this: https://github.com/MiguelCatalan/MaterialSearchView

Dmitry
- 369
- 4
- 18