Adding a listener to an invisible button in android

hi I'm trying to add a listener for a button. with property visibility: invisible. can i add? if u provide a solution for this, it will be great.pls

+3
source share
1 answer

You can add a listener. But you cannot press the invisible button so that the listener cannot be called at any time during the execution of the Activity ...

but you can make a transparent image as a background, as well as text = ""

so that it is not visible to the user, you also do not need to make it invisible.

The listener is also called when the user touches this place.

Thank.

+5
source

All Articles