Android add arrow image to spinner

后端 未结 5 803
梦谈多话
梦谈多话 2020-12-14 08:49

I have created a background drawable that I use for a spinner. I would like to now but an arrow image inside this background. I have tried things like android:drawableRight=

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-14 09:08

    Aniruddha's solution worked fine for me, when I used JellyBean (4.2.2) or Kitkat (4.4). But unfortunately on Marshmallow (6.0) I have an exception, possible cause explained here: Using drawable resources

    I ended up just making a trick and place spinner to LinearLayout with ImageView like this:

    
    
        
        
    
    

提交回复
热议问题