如何展示一个非常大的项目列表(横向/纵向),并允许自由滚动/拖动-就像Google表格一样?
我尝试使用带有RecyclerView的NestedScrollView,但是你只能一次在一个方向上滚动,而我需要它能够自由地被拖动(不需要捏/缩放功能,但如果可以做到的话,那是额外的奖励)。
这里是一个GIF,展示了我尝试过的内容,它可以工作,但绝对不是我想要的。
我尝试使用带有RecyclerView的NestedScrollView,但是你只能一次在一个方向上滚动,而我需要它能够自由地被拖动(不需要捏/缩放功能,但如果可以做到的话,那是额外的奖励)。
这里是一个GIF,展示了我尝试过的内容,它可以工作,但绝对不是我想要的。
这是布局文件:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include
layout="@layout/include_toolbar"
android:id="@+id/toolbar" />
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_biscroll"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.v4.widget.NestedScrollView>
</LinearLayout>