我在滚动视图和水平滚动视图的布局中使用了许多微调器。当我选择微调器布局时,会自动滚动到屏幕顶部。
下面我粘贴我的布局
<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>
如果有人对此有解决方案,请帮助我。