尽管设置如此,我的文本视图仍在换行文本lines="1"
and ellipsise="end"
。除了防止换行手出现带有“...”的文本省略号之外,我还需要做什么?
<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" />
see the third item: "New sputter tool" etc.
将以下内容添加到您的 TextView 定义中:
android:maxLines="1"
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)