Remove Spacing or Padding in android Spinner

后端 未结 14 1865
旧时难觅i
旧时难觅i 2020-12-15 16:01

I\'m using android spinner and edittext from support lib v21. I would like to align text to left the same like edittext as shown in figure. But, deafult spinner include spac

14条回答
  •  无人及你
    2020-12-15 16:56

    If yo don't want to mess in Java Code and have it in styles

    Search for this file (Cmd+Shift+O) abc_spinner_textfield_background_material.xml

    and copy to your project. Remove all inset values from root element and refer the file as background of your spinner.

    In my case it looks like this (drawable/spinner_background.xml)

    
        
            
                
                    
                    
                
            
            
                
                    
                    
                
            
        
    
    

    and in my styles.xml I use it this way

    
    

提交回复
热议问题