[英]Android ScrollView detect end of/finished scroll animation
My problem is simple: I would like to detect when ScrollView ended a scroll animation. 我的问题很简单:我想检测ScrollView何时结束滚动动画。
The only working solution I can find is the one below, it is checking every 100 ms to see if the scroll ended, that sounds horrible to me. 我能找到的唯一可行的解决方案是以下解决方案,它每隔100毫秒检查一次滚动是否结束,这对我来说听起来很可怕。 https://stackoverflow.com/a/10198865/1310343
https://stackoverflow.com/a/10198865/1310343
Is there a more elegant solution? 有没有更优雅的解决方案?
Try extending the ScrollView class and override the onScrollChanged method. 尝试扩展ScrollView类并重写onScrollChanged方法。 That should work.
那应该工作。 With the 'getMaxScrollAmount' method you should be able to find if the scrolling is done.
使用“ getMaxScrollAmount”方法,您应该能够找到滚动是否完成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.