disable a View - Android User Interface

Android examples for User Interface:View Enable

Description

disable a View

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    public static void disableView(View view) {
        view.setFocusable(false);//  ww  w  .  j a  v  a2s  .  c  om
        view.setClickable(false);
    }
}

Related Tutorials