Is it possible to disable Touch events for all the views inside a Layout by targetting the ParentLayout. I know this is possible by going through each individual view contained in the Layout but it would be very helpful if there was a way to do it for complete Layout. I have already tried the following but all in vain.
ParentLayout.setClickable(false);
ParentLayout.onFilterTouchEventForSecurity(event);
ParentLayout.onTouchEvent(event);
ParentLayout.setOnTouchListener(l);
...
and others in similar fashion. Any help would be greatly appreciated.
dispatchTouchEvent()andonInterceptTouchEvent()can all achieve this goal.android:duplicateParentState="true"to all child view, and setparent
android:enable="false"