DEV Community

Cover image for Disable buttons and change the text of all buttons..
Anoop Patel
Anoop Patel

Posted on

Disable buttons and change the text of all buttons..

change button text

 public void disable(View v){
        v.setEnabled(false);
        Button button = (Button) v;
        button.setText("Disabled");
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more