[ACCEPTED]-how to disable touch event android-touch
Accepted answer
Do nothing but just return true in onTouchEvent().
If 2 you are using any view, use android:clickable="false" as 1 view's attribute in the xml.
I solved like below,
view.setClickable(true);
view_activity.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (view_activity.isClickable()) {
if (isOpened)
closeMenu();
return false;
}
else
return true;
}
});
0
if it's a View, you can use his method setClickable(false)
0
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.