2014-11-04 107 views
2

正如标题所说,我想在锁图标和文本之间留出一点空间。Android:图像和文本之间的空间编辑文本内

enter image description here

这里是我目前的XML:

<EditText 
     android:id="@+id/guide_payment_settings_email_et" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginLeft="7dp" 
     android:layout_marginRight="7dp" 
     android:layout_marginTop="5dp" 
     android:background="@drawable/border_paylpal_blue" 
     android:drawableLeft="@drawable/blue_rounded_lock" 
     android:hint="[email protected]" 
     android:inputType="textEmailAddress" 
     android:singleLine="true" 
     android:textColor="#4d4e5b" 
     android:textSize="12sp" /> 

回答

11

您必须低于线增加您的xml: - 上面一行

android:drawablePadding="10dp" 

给填充绘制后。

+0

它的作品就像一个魅力!谢谢! – 2014-11-04 13:26:23