How can I set the margin of a EditText using xml?
Try this for Right_margin
android:layout_marginRight = "15dip"
Try this for left margin
android:layout_marginLeft = "15dip"
if you give value in center
android:gravity = "center_horizontal"
Try this for left margin the second one in similar:
<EditText
android:id="@+id/editText1"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_marginLeft="15dp"
android:padding="12dp"
android:text="EditText" >
</EditText>