简体   繁体   English

强制停止滚动

[英]Force Stop Scrolling

How To "Force Stop" a Scrollable View (like a ListView) From Scrolling?如何从滚动中“强制停止”可滚动视图(如 ListView)?

I want to stop a scrollable view from scrolling.我想阻止可滚动视图滚动。 Is there a method to do this?有没有办法做到这一点? I want it to stop after I "TOUCH" the EditText.我希望它在我“触摸”EditText 后停止。 The scrollable view must not be disabled from scrolling, but if this happens I want to enable it again after the dispatching process of the the view after the touch.可滚动视图不能被禁用滚动,但如果发生这种情况,我想在触摸后视图的调度过程之后再次启用它。

In summary, the scrollable view must force stop (not disabling from scrolling) even if it is scrolling by touching an EditText.总之,可滚动视图必须强制停止(而不是禁用滚动),即使它是通过触摸 EditText 滚动的。

May just call可以打电话

listView.smoothScrollBy(0, 0);

to stop its scrolling.停止其滚动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM