Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
触摸视图时如何停止滚动?我正在使用一个警报对话框,其中动态数据正在添加。但是在单击视图时它不会停止滚动。所以我觉得很难选择一个项目。任何人都可以帮助 没有使用 Listview
试试这个代码:
YourList.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { return (event.getAction() == MotionEvent.ACTION_MOVE); } });