Wednesday 3 April 2013

How to Disabled Button ( Views ) in Android ?

Demo:

Activity:


package com.venky.disablingbutton;

import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;

public class DisablingButtonActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
        Button button = (Button) findViewById(R.id.button1);

            button.setEnabled(false);
    }
}


Download this Project Click Here

No comments:

Post a Comment