滚动条的RecyclerView使用
你好,大家好我在Android中使用RecyclerView并成功实施,现在我想添加滚动条,所以我的XML代码滚动条的RecyclerView使用
<android.support.v7.widget.RecyclerView android:id="@+id/thumb_grid" android:layout_width="match_parent" android:scrollIndicators="start" android:scrollbarSize="59dp" android:scrollbarThumbVertical="@mipmap/photos_selected" android:scrollbars="vertical" android:layout_height="match_parent" android:layout_margin="10dp" />
现在滚动条显示,但我想,当我们按下滚动条图像并移动到顶部,这样屏幕应该也滚动并且相同,以便向下滚动到滚动条图像,但它不起作用。
RecyclerView默认不支持快速滚动。您需要使用其他一些库来实现相同的功能。
试试这个 - https://stackoverflow.com/a/28494241/1741586
希望它会帮助你:)
我的代码和此代码之间有什么区别...有没有问题或错误..在我的代码中? – aj0822ArpitJoshi
并使用此代码..我滚动图像已经消失... – aj0822ArpitJoshi
okk iill试试这个 – aj0822ArpitJoshi
有这个没有默认的实现。您可以使用[this](https://android-arsenal.com/details/1/2673)库。 –