I want the default view of searchview in expanded form, placed inside layout file.
my code...
layout file:
<android.support.v7.widget.SearchView
android:id="@+id/search_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/rel2"
android:layout_alignTop="@id/rel2"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:textSize="16sp" />
Java src:
search_view.setIconifiedByDefault(false);
There is other option like: this one and this one
both dosen't work for me.