android - How to set focus on button if clicked and buttons are made in xml -
i have created 3 buttons , want change focus of button clicked user using coding there way ?
i have seen these links
but want know when made instances of these 3 buttons want focus clicked @ time , want change focuscolor on click defined me using coding? can tell me?
final button button = (button) findviewbyid(r.id.button_id); button.setfocusable(true); button.setonfocuschangelistener(new view.onfocuschangelistener() { @override public void onfocuschange(view v, boolean hasfocus) { // todo auto-generated method stub } });
try sample code
Comments
Post a Comment