How to remove focus from SearchView?
I want to remove focus and text from SearchView in onResume() To achieve this you could set your root layout focusable with the android:focusableInTouchMode attribute and request focus on that View in onResume(). For example: <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/root_layout” android:layout_width=”match_parent” android:layout_height=”match_parent” android:orientation=”vertical” android:focusableInTouchMode=”true”> <SearchView android:id=”@+id/search_view” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:iconifiedByDefault=”false”/> </LinearLayout> And then in your … Read more