android - Detect the button was clicked and make it invisible -


i have following method want few buttons show image , rest of buttons should invisible when clicked. whatever other v.getid() want invisible.

public void onclick(view v)          {             if(v.getid() == r.id.d){                 imgd.setvisibility(view.visible);             }else if(v.getid() == r.id.i){                 imgi.setvisibility(view.visible);             }else if(v.getid() == r.id.l){                 imgl.setvisibility(view.visible);             }else{                 //if other buttons clicked button must invisible.             }         } 

for invisibilty, there method in android,

imgd.setvisibility(view.gone); 

let me know working or not ?


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -