android - TextView's ellipsize not working on maxLines = 1 -
i cannot figure out why, able ellipsize working on maxlines=2
, more. displaying few words of description , long string no spaces.
this how textview looks like:
<textview android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:textcolor="#757575" android:text="@string/gcm_not_registered" android:maxlines="1" android:ellipsize="end" android:id="@+id/login_gcmregistrationtextview"/>
i programatically set text it, depending on maxlines limitation, 2 different results:
the thing changed maxlines
, why isn't line filled in first image well?
there 2 ways prepare it:
try alterandroid:ellipsize="end"
attribute android:ellipsize="marquee"
. try remove android:maxlines="1" android:ellipsize="end"
attributes , add together android:singleline="true"
attribute. android textview
No comments:
Post a Comment