Change spinner background color but keep arrow

前端 未结 11 1345
予麋鹿
予麋鹿 2020-12-13 01:41

I\'ve read several thing about it but I can\'t find what I need. I want to keep the grey arrow but I want to remove the horizontal bar from the default style and have a whit

11条回答
  •  执笔经年
    2020-12-13 02:07

    Hi instead of wrapping Spinner component around Parent Layouts like LinearLayout, RelativeLayout etc which increases layout parsing simply create a drawable called spinner_bg.xml under drawable folder.

    
    
        
            
        
    
    

    Set spinner_bg as the background of your spinner and it works like charm:

    
    

提交回复
热议问题