android button selector

前端 未结 6 722
梦毁少年i
梦毁少年i 2020-11-22 04:19

This is a button selector such that when normal it appears red, when pressed it appears grey.

I would like to ask how could the code be further directly modified suc

6条回答
  •  余生分开走
    2020-11-22 05:16

    Best way to implement the selector is by using the xml instead of using programatic way as its more easy to implemnt with xml.

            
    
            
            
            
    
        
    

    For more information i implemented using this link http://www.blazin.in/2016/03/how-to-use-selectors-for-botton.html

提交回复
热议问题