Spinner Dropdown Arrow

后端 未结 2 1507
太阳男子
太阳男子 2020-12-19 10:28

I am trying to obtain a custom Spinner such as this one:

\"\"

but I was only able to get this:

2条回答
  •  轮回少年
    2020-12-19 10:59

    You have to remove the Imageview into your custom layout row_spinner.xml. In case, you don't need to create an arrow inside your custom layout, because if you do, it'll be created in each row like happened to you. For doing the same you showed us, you must change the Spinner style into your styles.xml.

    For example:

    
    
        
    
        
    
        
        
    
        
    
        
    
        
    
    
    

    For further information take a look: http://androidopentutorials.com/android-how-to-get-holo-spinner-theme-in-android-2-x/

    EDIT

    selector_spinner.xml:

    
    
    
        
    
            
    
                
                    
                        
    
                        
    
                        
    
                        
                    
                
    
                
    
                    
    
                
    
            
    
        
    
    
    

    styles.xml:

    
    
        
        
    
        
    
    
    

    At the end, the spinner will look like as enter image description here

    EDIT 2

    The following code is into details_fragment_three.xml

     
    

提交回复
热议问题