user1371813
user1371813

Reputation: 9

How to perform disable imageButton in android?

I want to do disable ImageButton(means Physically button shown but user can not click over there) in android,I know Invisible but through which ImageButton not show on screen, Can u tell me it is posible in android? How?

Upvotes: 0

Views: 2953

Answers (3)

Samir Mangroliya
Samir Mangroliya

Reputation: 40406

Can u tell me it is posible in android?

Yes, it's possible in android.

like,

ImageButton imgButton  = new ImageButton(this);
imgButton.setEnabled(false);

Upvotes: 1

KMI
KMI

Reputation: 506

its possible

just add this in image button in your xml file

 android:clickable="false"

Upvotes: 0

Jeje Doudou
Jeje Doudou

Reputation: 1706

You can specify myImageButton.setEnabled(false); for exemple.

Upvotes: 0

Related Questions