EditText ellipsize (three dots...)

AdaMoOo picture AdaMoOo · Oct 9, 2013 · Viewed 20.3k times · Source

Unfortunatelly I am not able to make ellipsize for EditText works. Is even possible to put three dots at the end of the text when the text is too long? It is working perfectly for TextiView but not for EditText. Some idea?

 android:id="@+id/ed_email_personalInfo"
 android:layout_width="match_parent"
 android:layout_height="55dp"
 android:background="@color/transparent"
 android:ellipsize="end"
 android:ems="10"
 android:hint="@string/email"
 android:inputType="textEmailAddress"
 android:maxLength="64"
 android:paddingLeft="10dp"
 android:paddingRight="10dp"
 android:singleLine="true"
 android:textColorHint="@color/col9a9a9a"
 android:textSize="15.7sp"

Answer

Oleksandr picture Oleksandr · Aug 18, 2015

You have to remove android:inputType attribute.

Ellipsize doesn't work if inputType is defined.