How do you programmatically add/remove style to an android button? Is it possible to apply the styling at runtime?
I have two buttons that look like these
     ----------   ----------
    | Button A | | Button B |
     ----------   ----------
what i wanted to do is when a button is clicked (lets say Button B), it runs some code, then changes the style of button B to something else (i.e highlighted borders) and will be something like this:
     ----------    ==========
    | Button A | || Button B ||
     ----------    ==========
I know how to do the styling(i.e create the style) in XML, all I want to know is how to apply the styles on runtime/using java code.
 
     
     
     
     
     
    