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"
You have to remove
android:inputType
attribute.Ellipsize doesn't work if inputType is defined.
Might not be possible in EditText (unless you create your own View). I think the default behavior (for singleLine EditText) is that you can scroll the text sideways when it can't fit in the view.
You need write a new class that extends
EditText
. for example:Set this property to edit text. Elipsize is working with disable edit text