Android Button Styling Programmatically

前端 未结 3 1919
死守一世寂寞
死守一世寂寞 2020-12-15 13:25

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

              


        
3条回答
  •  一整个雨季
    2020-12-15 14:09

    As I answered in this other thread, you could either set the background programatically as some folks suggest, or you could set the style programatically (as I suggest here) if you are using the support library.

提交回复
热议问题