I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80%. Even though the SlidingDrawer view is in focus, it is still possible to cli
Joe's answer did not do the trick for me. My scenario is a bit diferent. I have a FrameLayout with two children. Only one of the children has to be 'active' at a given moment, and while the second is active the first should no longer process any input. My solution:
public static void changeVGstate(ViewGroup current, boolean enable)
{
current.setFocusable(enable);
current.setClickable(enable);
current.setEnabled(enable);
for (int i = 0; i < current.getChildCount(); i++)
{
View v = current.getChildAt(i);
if (v instanceof ViewGroup)
changeVGstate((ViewGroup)v, enable);
else
{
v.setFocusable(enable);
v.setClickable(enable);
v.setEnabled(enable);
}
}
}
Enjoy!