Button Invisible and enabled

mrossen

Active Member
Licensed User
Longtime User
Hi,

Are it right when I make a button there is enabled but invisible, I can not push it?

I am working on a project that use a imageview as background and on top of it I have a button. I have made that visible = false becourse I alrady have the button image on my background.
Mogens
 

klaus

Expert
Licensed User
Longtime User
Are it right when I make a button there is enabled but invisible, I can not push it?
Yes.

You can set the bitmap directly to the button in the Designer.
First add the image file
Then, Button properties/Drawable/StateListDrawable then
EnabledDrawable/BitmapDrawable and below select the image file.
You can have different images for the different states of the button.

Best regards.
 
Upvote 0

mrossen

Active Member
Licensed User
Longtime User
Hi Klaus,

Thanks for the quick reply.

What I tried to explain before is that I have a picture of a remote control that fills the entire screen. Then I have put in a button on the top of the remote control picture. But i only need the button to grab the _Click. The picture for the button is on the background. Ex the play button. Then I made the button invisible so I again can see the play button. The problem is that the button not working when it is invisible. As an alternative I Need to mark up an area on the picture to define as the play button. I dont know if you can do that,

Mogens
 
Upvote 0
Top