android - TextView Ellipsize not working -


below textview defined in xml.

     <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:hint="select language"             android:singleline="true"             android:maxlines="1"             android:maxlength="30"             android:ellipsize="end"             android:padding="4dp"             android:textappearance="?android:textappearancemedium"             android:textcolor="@android:color/holo_blue_dark"             android:id="@+id/selected_language" /> 

i want ellipsize text when text length greater 30 chars not working @ all.please check if missing anything.i tried answers posted similar question did not work.

i have changed maxlength maxems in textview working use this.

<textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:hint="select language"             android:singleline="true"             android:maxlines="1"             android:maxems="30"             android:ellipsize="end"             android:padding="4dp"             android:textappearance="?android:textappearancemedium"             android:textcolor="@android:color/holo_blue_dark"             android:id="@+id/selected_language" /> 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -