Android examples for User Interface:View Enable
set View Group Enabled
//package com.java2s; import android.view.View; import android.view.ViewGroup; public class Main { public static void setViewGroupEnabled(ViewGroup group, boolean isEnabled) { for (int i = 0; i < group.getChildCount(); i++) { View child = group.getChildAt(i); child.setEnabled(isEnabled); if (child instanceof ViewGroup) setViewGroupEnabled((ViewGroup) child, isEnabled); }/*from w ww. ja v a2 s.c o m*/ } }