listener - Android: how add opacity on ImageButton click? -
i thought use ontouchlistener , tracking down , events, setting alpha value, have add listener imagebuttons (they lot). wonder if there shortcut achieve result.
in case when user click on button , cause change opacity of button can do:
in xml file
on button declaration add line:
android:onclick = "clickmethod"
and in java file
need implement clickmethod,
public void clickmethod(view view) { // change opacity }
so, if want same process(change button opacity) each button, in xml file each button add line
android:onclick="clickmethod"
Comments
Post a Comment