How to define button background at one place and used around the whole app?

后端 未结 2 1911
感情败类
感情败类 2021-01-18 03:29

I would like all the buttons of my android application use the same background image, that\'s all buttons have attribute:

android:background         


        
2条回答
  •  遥遥无期
    2021-01-18 03:39

    Define styles.xml with the below:

    
    
      
    
    

    And use the same style for any button within your application as:

    
    

提交回复
热议问题