Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.view.View;

public class Main {
    /**
     * Set the enabled state of this view. The interpretation of the enabled
     * state varies by subclass.
     *
     * @param enabled True if this view is enabled, false otherwise.
     */
    public static void setViewEnabled(View view, boolean enabled) {
        if (view == null) {
            return;
        }
        if (view.isEnabled() != enabled) {
            view.setEnabled(enabled);
        }
    }
}