Can I make an Android button template?

前端 未结 4 2105
被撕碎了的回忆
被撕碎了的回忆 2021-02-09 00:32

I have several buttons in my current app. They are all identical except for their text and a tag. The main.xml would be a lot nicer if I didn\'t have to repeat all the button

4条回答
  •  抹茶落季
    2021-02-09 01:38

    You can create a selector

     
    
        
        
    

    And set the 10 button android:background="@drawable/that_selecter"

提交回复
热议问题