android:drawableLeft margin and/or padding

后端 未结 18 2220
猫巷女王i
猫巷女王i 2020-11-27 09:29

Is it possible to set the margin or padding for the image which we added with the android:drawableLeft?

18条回答
  •  旧巷少年郎
    2020-11-27 10:15

    define a shape for your edittext and give it a padding For Example

    
    
        
        
        
    
        
    
    

    The padding defined in this shape will help in give padding to drawableleft or right ---------------------- Apply this shape on EditView

     
    

    using that defined shape as background will give your EditText some style plus margin to drawableLeft.

提交回复
热议问题