Switch-Button thumb gets skewed?

后端 未结 4 1210
说谎
说谎 2020-12-31 12:28

The thumb for my Switch-button seems to get skewed(for on&off state). There were similar problems on github, but those were for people making libraries to support Switch

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-31 13:07

    For Custom Switch (Like IOS switch) I tried below Steps:

    Create a drawable track_selector.xml:

    
    
        
            
                
                
                
            
        
        
            
                
                
                
            
        
    
    

    Create a drawable thumb_selector.xml:

    
    
        
            
                
                
                
                
            
        
    
    

    In your layout :

    
    

    Its working fine for me.

提交回复
热议问题