Android examples for User Interface:ViewGroup
Set Enable Controls for ViewGroup
//package com.java2s; import android.view.View; import android.view.ViewGroup; public class Main { public static void SetEnableControls(boolean enable, ViewGroup vg) { try {/*from w w w. ja v a 2 s . c o m*/ for (int i = 0; i < vg.getChildCount(); i++) { View child = vg.getChildAt(i); child.setEnabled(enable); if (child instanceof ViewGroup) { SetEnableControls(enable, (ViewGroup) child); } } } catch (Exception ex) {/* Do nothing */ } } }