android - Why wont the button disappear? -
im trying develop android app, , 1 of features when hitting button, should button disappears. this, not work, can explain me why? thanks!
button startbutton = (button) findviewbyid(r.id.startbutton); startbutton.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view){ view thisbutton = findviewbyid(r.id.startbutton); thisbutton.setvisibility(view.gone); } });
try following:
button startbutton = (button) findviewbyid(r.id.startbutton); startbutton.setonclicklistener(new onclicklistener() { @override public void onclick(view view) { view.setvisibility(view.gone); } });
Comments
Post a Comment