ScrollView中嵌套ViewPager,当ViewPager切换时,ScrollView滑动到底部问题
需要在ScrollView的第一个布局中加入以下配置
android:focusable="true"
android:focusableInTouchMode="true"
<android.support.v4.widget.NestedScrollView
android:id="@+id/myScrollView"
android:layout_width="0dp"
android:layout_height="0dp">
<LinearLayout
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
</LinearLayout>
</android.support.v4.widget.NestedScrollView>