Custom Spinner with rounded corners, stroked edge and a selector icon

前端 未结 1 1470
难免孤独
难免孤独 2021-02-04 14:50

I want my Spinner to have a black gradient background with white text on the left and a selector icon on the right (a white downwards pointing triangle). As I see i

1条回答
  •  后悔当初
    2021-02-04 15:22

    I've done something similar to method 1 in my app. Basically you need to combine your selector with a layer-list:

    
    
        
            
                
                    
                        
                        
                        
                        
                    
                
                
                    
                
            
        
    
    

    In my xml I also added a third layer containing a that is invisible (i.e. its alpha is set to 0) but adds padding.

    0 讨论(0)
提交回复
热议问题