SearchView отлично выглядит на устройствах Lollipop (Android 21):


Но на Android 23-28 он не скрывает все значки с правой стороны:


<item android:id="@+id/action_search"
android:title="@string/search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="ifRoom"/>
<item android:id="@+id/action_sort"
android:title="@string/sorting"
android:icon="@drawable/sort"
app:showAsAction="ifRoom"/>
Как это исправить?
Обновление
Кажется, Android 23 и выше больше не скрывают значки справа (потому что естьдостаточно места)
Но он работает нормально только в том случае, если у вас нет домашней кнопки или меню гамбургера слева:


Но у меня есть значок слева, и поэтому моя панель действий выглядит ужасно при расширении SearchView:


Должна быть ошибка в новейшем дизайне Android ActionBar ...
Я добавляю кнопку меню следующим образом:
supportActionBar?.let {
it.setDisplayHomeAsUpEnabled(true)
it.setHomeAsUpIndicator(R.drawable.ic_menu)
}