Android how to make button text bold when pressed or focussed

后端 未结 3 1198
执念已碎
执念已碎 2020-12-08 21:28

I want to change the text inside a button to be bold when the button is highlighted or pressed. I currently use a xml file to define the button and use the XML to change how

3条回答
  •  时光取名叫无心
    2020-12-08 22:10

    Attention! See update below


    You could create your own style.xml in which you define the text style. In your selector you can reference to the style. style.xml

    
    

    And in your selector

    
     
    

    Update 2020: My answer is more than 10 years old. It doesn´t work anymore!

提交回复
热议问题