机器人:AbsListView.OnScrollListener SCROLL_STATE_IDLE SCROLL_STATE_TOUCH_SCROLL(2.1版)后,不叫 [英] android: AbsListView.OnScrollListener SCROLL_STATE_IDLE is not called after SCROLL_STATE_TOUCH_SCROLL (Version 2.1)

查看:257
本文介绍了机器人:AbsListView.OnScrollListener SCROLL_STATE_IDLE SCROLL_STATE_TOUCH_SCROLL(2.1版)后,不叫的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个2.1的Andr​​oid版中的问题。它看起来像一个bug。

I have a problem with android version 2.1. It looks like a bug.

我连接了 OnScrollListener 我的ListView。

I attached an OnScrollListener to my listView.

我使用的方法 onScrollStateChanged(AbsListView观点,诠释scrollState)监视我的列表视图的滚动的状态。

I'm using the method onScrollStateChanged(AbsListView view, int scrollState) for monitoring the scroll's state of my listview.

在scrollstate可以假设3的值(取自文档):

The scrollstate could assume 3 value (taken from the documentation):

  1. SCROLL_STATE_FLING :用户有 previously一直使用滚动 触摸并进行了一扔。该 动画现在滑行到停止
  2. SCROLL_STATE_IDLE :视图不 滚动。注意浏览列表 采用了轨迹球算作是 在因为这些空闲状态 过渡不够生动。
  3. SCROLL_STATE_TOUCH_SCROLL :用户 正在滚动使用触控,和他们 手指还在屏幕上
  1. SCROLL_STATE_FLING: The user had previously been scrolling using touch and had performed a fling. The animation is now coasting to a stop
  2. SCROLL_STATE_IDLE:The view is not scrolling. Note navigating the list using the trackball counts as being in the idle state since these transitions are not animated.
  3. SCROLL_STATE_TOUCH_SCROLL:The user is scrolling using touch, and their finger is still on the screen

我认为在 SCROLL_STATE_IDLE 其他两种状态后,总是会通过。 它总是如此除外2.1 Android版。 SCROLL_STATE_IDLE 是不是以后通过的 SCROLL_STATE_TOUCH_SCROLL 此问题也发生如果您通过触摸停止一扔,而不是让滚动停止本身。 这种奇怪的行为留下我的ListView在unconsistate状态。

I assume that the SCROLL_STATE_IDLE will always be passed after one of other two states. It's always true excepted for android version 2.1. SCROLL_STATE_IDLE is not passed after SCROLL_STATE_TOUCH_SCROLL The problem happens also if you stop the fling by a touch instead of let the scroll stop by itself. This strange behaviour leaves my listView in an unconsistate state.

Someonelse有同样的问题? 建议一个不那么脏的解决?

Someonelse has the same problem? Suggestion for a "not-so-dirty" work around?

推荐答案

我觉得这是已注册此情况下的错误。

I think there is a bug that has been registered for this case.

<一个href="http://$c$c.google.com/p/android/issues/detail?id=5086">http://$c$c.google.com/p/android/issues/detail?id=5086

这篇关于机器人:AbsListView.OnScrollListener SCROLL_STATE_IDLE SCROLL_STATE_TOUCH_SCROLL(2.1版)后,不叫的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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