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

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -