开发者

How to set a Button gray and unclickable? [duplicate]

This question already has answers here: How to disable an Android button? (13 answers) Closed 6 years ago.

I want to set the button unclickable and look like a dark gray image of an button开发者_高级运维?

Is this possible?


From the xml:

android:enabled="false"

From the code

button.setEnabled(false);


What about button.setEnabled(false) ?


simply set the attribute android:enabled="false" in your xml.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜