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.
我已经在 GridView 中显示了按钮的数量,如果触摸按钮并滚动它,则在移动设备中,按钮正在移动,我想禁用按钮的滚动。但在模拟器中它不滚动。
请给任何想法....
请帮助某人禁用 Gridview 中的按钮滚动.....
为 GridView 使用 setOnTouchListener 已禁用滚动。
gridView.setOnTouchListener(new OnTouchListener(){
@Override public boolean onTouch(View v, MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_MOVE){ return true; } return false; } });