I have one action with the action bar. The action bar contains a search. I do not want this return button that appears when you click on the search search. Can I delete it or hide it? This back button is not displayed until I press the search button. By the way, the following line of code does not help.
getSupportActionBar().setDisplayHomeAsUpEnabled(false);

Menu resource
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_search"
android:title=""
app:showAsAction="always|collapseActionView"
android:icon="@drawable/ic_action_search"
app:actionViewClass="android.support.v7.widget.SearchView" />
</menu>
Egis source
share