I've an action bar and three tabs each includes some list to display. When I click search I want the rest of the action bar should be hidden except the list in a tab and search item it self should be enabled, where want to search.
How can I achieve it?
Edit:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<!-- Single menu item
Set id, icon and Title for each menu item
-->
<item
android:id="@+id/action_search"
android:title="@string/action_search"
android:orderInCategory="100"
android:icon="@drawable/ic_action_search"
app:showAsAction="ifRoom|collapseActionView"
app:actionViewClass="android.support.v7.widget.SearchView"/>
<item android:id="@+id/home"
android:icon="@drawable/icon_home"
android:title="Home" />
<item android:id="@+id/totalCash"
android:icon="@drawable/icon_delivered"
android:title="Cod" />
<item android:id="@+id/statusForEach"
android:icon="@drawable/icon_cancelled"
android:title="Status" />
<item android:id="@+id/logout4"
android:icon="@drawable/icon_cancelled"
android:title="Logout" />
<!--<item android:id="@+id/menu_delete"
android:icon="@drawable/icon_delete"
android:title="Delete" />
<item android:id="@+id/menu_preferences"
android:icon="@drawable/icon_preferences"
android:title="Preferences" />-->