我有一个VerticalScrollView里面的HorizontalScrollView。如果我滚动水平,滚动是平稳的。但是,如果我垂直滚动,滚动不平滑,有时滚动水平。如何使垂直滚动顺畅?HorizontalScrollView里面的ScrollView android
这里是我的XML,
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.sasank.calendarview.MainActivity"
android:background="@android:color/white">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_marginLeft="200dp"
android:layout_alignParentBottom="true"
android:layout_marginBottom="20dp">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/chapter_list"
android:layout_width="150dp"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
<HorizontalScrollView
android:id="@+id/horizontal_scroll"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toRightOf="@id/chapter_list"
android:scrollbars="horizontal">
<android.support.v7.widget.RecyclerView
android:id="@+id/calendar"
android:layout_width="wrap_content"
android:layout_height="match_parent">
</android.support.v7.widget.RecyclerView>
</HorizontalScrollView>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</RelativeLayout>
即时通讯使用垂直LinearLayoutManager为Chapter_list Recyclerview和GridLayoutManager日历RecyclerView连接到嵌套滚动
不知道它是否已经被固定,但滚动型的嵌套不支持或推荐。出于这个原因,我不得不建立一个自定义日历。 – samosaris