如何检测多达滚动列表视图中 [英] how to detect up-scrolling in listview

查看:209
本文介绍了如何检测多达滚动列表视图中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏动作条上的向上滚动列表视图中和列表视图的向下滚动一次施展动作条。是否有任何检测向上和向下的ListView滚动方法?如果是的话,请提供一些参考。

I want to hide actionbar on up-scrolling of listview and displaying actionbar again on down-scrolling of listview. Is there any method to detect up and down scrolling of listview? if yes, then please provide some reference.

任何帮助或指导将是非常美联社preciated。

Any help or guidance will be well appreciated.

推荐答案

API提供了这样的方法,但它们受到保护,所以在我看来,最好的做法是创建包装类(扩展滚动型),并让这些方法公开,特别是 onScrollChanged onOverScroll

API provides such methods, but they are protected, so the best practice in my opinion, is to create wrapper class (extend ScrollView) and make those methods public, particularly onScrollChanged and onOverScroll.

您可以看看下面的问题,看看如何做到这一点:

You may look at the following questions to see how to do this:

http://pastebin.com/ePeyswyQ

<一个href=\"http://stackoverflow.com/questions/12114963/detecting-the-scrolling-direction-in-the-adapter-up-down\">Detecting在适配器滚动方向(向上/向下)

这篇关于如何检测多达滚动列表视图中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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