Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.View;
import android.view.ViewGroup;

public class Main {
    public static void SetEnableControls(boolean enable, ViewGroup vg) {
        try {
            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 */
        }
    }
}