Reputation: 307
I want put ont top layout SearchView. I have MyActivity with SearcView and below it there is RecyclerView, when i open MyActivity it show first RecyclerView, if i want see SearchView i scroll upward. How i set MyActivity so that when i open MyActivity, it show me first SearchView?
<ScrollView
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="vertical">
<SearchView
android:layout_width="match_parent"
android:layout_height="50dp"
android:queryHint="Evento"
android:id="@+id/cercaEvento"/>
</LinearLayout>
......
</ScrollView>
Upvotes: 0
Views: 886
Reputation: 51
Try this.this is solve your problem
http://javapapers.com/android/android-searchview-action-bar-tutorial/
Upvotes: 1