<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <item android:id="@+id/search"
        android:title="@string/action_filter"
        android:icon="@android:drawable/ic_menu_search"
        app:showAsAction="collapseActionView|ifRoom"
        app:actionViewClass="androidx.appcompat.widget.SearchView" />
    <item
        android:id="@+id/action_view_source"
        app:showAsAction="never"
        android:title="@string/action_view_source" />
    <item
        android:id="@+id/action_view_translation"
        app:showAsAction="never"
        android:title="@string/action_view_translation" />
    <item
        android:id="@+id/action_view_bugs"
        app:showAsAction="never"
        android:title="@string/action_view_bugs" />
</menu>

<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto">
    <item android:id="@+id/search"
        android:title="@string/action_filter"
        android:icon="@android:drawable/ic_menu_search"
        app:showAsAction="collapseActionView|always"
        app:actionViewClass="androidx.appcompat.widget.SearchView" />
    <item
        android:id="@+id/action_view_source"
        app:showAsAction="never"
        android:title="@string/action_view_source" />
    <item
        android:id="@+id/action_view_translation"
        app:showAsAction="never"
        android:title="@string/action_view_translation" />
    <item
        android:id="@+id/action_view_bugs"
        app:showAsAction="never"
        android:title="@string/action_view_bugs" />
</menu>

Fix showAsAction to avoid menu item to dissapear
Fix showAsAction to avoid menu item to dissapear
