mercredi 6 mai 2015

Padding doesn't work on some devices

I had a strange problems during the set padding to EditText. xml looks like this:

<EditText
    android:layout_width="270dp"
    android:layout_height="55dp"
    android:ems="10"
    android:id="@+id/etEmail"
    android:textStyle="bold"
    android:layout_gravity="center_vertical"
    android:textColor="#FFFFFF"
    android:hint="Or Use your Email"
    android:inputType="textEmailAddress"
    android:layout_alignLeft="@+id/textView6"
    android:layout_alignStart="@+id/textView6"
    android:textColorHint="#FFFFFF"
    android:background="@drawable/line_white"
    android:paddingLeft="16.5dp"
    android:layout_marginTop="10dp"
    android:paddingRight="2dp" />

Here is the screenshot from Samsung Note 2 (Android 5.0.1):

enter image description here

... and LG G3 (Android 4.4.2):

enter image description here

As you can see, android:paddingLeft doesn't work for LG.

What could be the reason?

Thanks.

Aucun commentaire:

Enregistrer un commentaire