Skip to content Skip to sidebar Skip to footer

Can't See Search In Action Bar

Somehow I am unable to see search in action bar. menu main: Copy

And you can force-show it by:

android:showAsAction="always"

Solution 2:

showAsAction attribute should be of app schema. If you are using SearchView of v7 support library it should be also of app schema.

<item android:id="@+id/action_search"
      android:title="Search"
      android:icon="@android:drawable/ic_menu_search"
      app:showAsAction="collapseActionView|ifRoom"
      app:actionViewClass="android.support.v7.widget.SearchView"/>

You can find the code snippets for complete implementation of SearchView in the following link: NullPointerException in Android code

Post a Comment for "Can't See Search In Action Bar"