安卓L:快速滚动的RecyclerView [英] Android L: Fast scroll for the RecyclerView

查看:281
本文介绍了安卓L:快速滚动的RecyclerView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用 RecyclerView 在我有大量的数据在它的应用,并希望做一个快速滚动它,就像为的ListView 。方法从这个答案我曾与的ListView ,但不为 RecyclerView 工作。即使我设置快速滚动到 RecyclerView 的布局,它仍然不能正常工作:

I'm trying to use RecyclerView in my application with lots of data in it and would like to make a fast scroll for it, just like for the ListView. Approach from this answer worked for me with ListView, but does not work for the RecyclerView. Even if I set fast scroll to true in RecyclerView layout, it still does not work:

    <android.support.v7.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:scrollbars="vertical"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fastScrollEnabled="true"
            android:fastScrollAlwaysVisible="true" />

请问 RecyclerView 支持快速滚动在Android的L&找不到有关这方面的任何文件。

Does the RecyclerView supports the fast scroll in Android L? Can't find anything about this in documentation.

推荐答案

的唯一的事情,你会发现在RecyclerView是循环逻辑的基本实现。它的ListView的,因为它为您提供了最大的定制灵活性(可以达到你想要不同的ListView任何独特的布局)完全截然相反,但它几乎没有内置它(不像ListView中有许多功能,如快速滚动滑块)

The only thing you will find in RecyclerView is the basic implementation of the recycling logic. It is the complete polar opposite of ListView in that it offers you maximum customisability (you can achieve any unique layout you want unlike ListView), but it has almost nothing built in with it (unlike ListView which has numerous features like the fast scroll thumb).

如果您要添加的东西,如快速滚动功能,你将需要开发它自己的现在。

If you want to add something like the fast scroll feature, you're going to need to develop it on your own for now.

请记住,RecyclerView仍处于测试阶段,并随时更改,配合Android大号API的正式发布。

Keep in mind that RecyclerView is still in Beta and subject to change with the official release of the Android L API.

这篇关于安卓L:快速滚动的RecyclerView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆