Meine Textansicht enthält Text trotz der Einstellungen lines="1"
und ellipsise="end"
. Was muss ich zusätzlich tun, um zu verhindern, dass die Zeilenumbruch-Hand den Text mit einem "..." wie vorgesehen ausklingt?Verhindern unerwünschter Zeilenumbruch in TextView
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/date"
android:background="@color/listHeaderBackground"
android:ellipsize="end"
android:gravity="left|center_vertical"
android:height="30dp"
android:lines="1"
android:maxLines="1"
android:paddingBottom="3dp"
android:paddingLeft="20dp"
android:paddingRight="7dp"
android:paddingTop="3dp"
android:text="New Ion Beam Etcher ordered blah blah blah blah"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/listHeaderForeground" />
siehe das dritte Element: "Neue Sputter-Werkzeug" usw.
**: scrollHorizontally **: Ob der Text darf breiter sein als die Ansicht (und kann daher horizontal gescrollt werden). Ref. hier: http://developer.android.com/reference/android/widget/TextView.html#attr_android%3ascrollHorizontal – Voicu