I am using about many spinner in layout in scrollview and horizontal scrollview. when i do selection of spinner layout scroll automatically to top of the screen.
below i paste my layout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:descendantFocusability="beforeDescendants"
android:fillViewport="true"
android:focusableInTouchMode="false" >
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/scroll_border" >
<RelativeLayout
android:id="@+id/rootRelative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:background="@drawable/contnent_border"
android:padding="5dp" >
<!-- reporter Detail layout -->
<LinearLayout
android:id="@+id/reporterLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<include layout="@layout/general_reporter_detail" />
</LinearLayout>
<!-- start of occurence detail tenLinear -->
<LinearLayout
android:id="@+id/occurenceDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/reporterLayout" >
<include layout="@layout/occurence_detail_flying_operation" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
</HorizontalScrollView>
</ScrollView>
</LinearLayout>
if anyone have a solution for this please help me.