Showing posts with label Button. Show all posts
Showing posts with label Button. Show all posts

Wednesday, June 26, 2013

How to disable a button - Android?


Programatically you can use the below code to disable a button

myButton.setEnabled(false);

In XML,

android:clickable="false"

or


android:enabled="false"