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 enableDisableView(View view, boolean enabled) {
        view.setEnabled(enabled);
        if (view instanceof ViewGroup) {
            ViewGroup group = (ViewGroup) view;
            for (int id = 0; id < group.getChildCount(); id++) {
                enableDisableView(group.getChildAt(id), enabled);
            }
        }
    }
}