Android Expanded Searchview Do Not Focus

Apr 13, 2019
Use androidx.appcompat.widget.SearchView

When SearchView is expanded, it doesn't not get focus automatically.

This problem persist in android.widget.SearchView, so you should use androidx.appcompat.widget.SearchView (used to be instead.

<item android:id="@+id/action_search"
    app:actionViewClass="androidx.appcompat.widget.SearchView" />

NOTE: Refer Add SearchView To Android Toolbar

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.