Android examples for User Interface:View Enable
set Enabled View Group
import android.view.View; import android.view.ViewGroup; public class Main { public static void setEnabledViewGroup(ViewGroup viewGroup, boolean enable) { for (int i = 0; i < viewGroup.getChildCount(); i++) { View view = viewGroup.getChildAt(i); if (view instanceof ViewGroup) { setEnabledViewGroup((ViewGroup) view, enable); }//from w w w. j av a 2 s.c o m view.setEnabled(enable); view.setClickable(enable); } viewGroup.setEnabled(enable); viewGroup.setClickable(enable); } }