Android - ExpandableListView 中快速滚动的拇指无法正确滚动列表

发布于 2024-12-06 00:46:25 字数 171 浏览 5 评论 0原文

我正在使用可扩展列表视图来显示包含不同数量的儿童的组列表。有时列表很长,所以我想启用快速滚动。我这样做了,当我以通常的方式用手指滚动列表时,一切工作正常。

但是当我抓住拇指并将其拖动到底部时,当我将拇指移动到距离顶部约 1/3 高度时,列表会滚动到最后一个位置。我该怎么做才能让拇指根据滚动条的完整高度定位列表?

i am using an expandablelistview to show a list of groups containing different counts of children. sometimes the list is very long, so i wanted to enable fastscroll. i did this and everything is working fine when i scroll the list with the finger in the usual way.

but when i grab the thumb and drag it to the bottom, the list is scrolled to the last position when i have moved the thumb about 1/3 of the height from the top. what can i do to have the thumb position the list according to the full height of the scrollbar?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

澜川若宁 2024-12-13 00:46:25

最后一个答案不见了。

这是 Android FastScroller 中的一个已知错误。

请参阅我附加到 http://code.google.com/p/ 的代码android/issues/detail?id=24635

它包含适用于某些特定情况的解决方法。

Last answer went missing.

This is a known bug in Android FastScroller.

See my code attached to http://code.google.com/p/android/issues/detail?id=24635

it contains a work-around that works for some specific cases.

谎言月老 2024-12-13 00:46:25

我在此处发布了解决方法。如果用户通过触摸或拇指滚动,它会使用 OnScrollListener 来执行不同的操作。

I posted a workaround here. It uses a OnScrollListener to act differently if the user scrolls via touch or via thumb.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文