Button Background Selector

前端 未结 2 1925
广开言路
广开言路 2021-01-18 02:40

I try to switch the background of Buttons if they are pressed. I build a Selector like the answer suggested here: Standard Android Button with a different color

Fin

2条回答
  •  长情又很酷
    2021-01-18 03:38

    here is the code I use, and it works really well.

     
        
        
    
        
        
    

    here I use two images I made using photoshop as a background

    the first is button_clicked and the second is button

    copy it and change use your own resources.

    hope I could help :)

提交回复
热议问题