我有一个带有大字体的TextView,如果我有一个长字,只有最后一个字符放入下一行.例如 :
Zusammenarbei
Ť
现在我想将文本格式化为如下所示:
Zusammenarb –
Ť
是否有可能实现这一目标?
最佳答案 我想比连字符更好,你可以做得更好.考虑下面的图像.
我想绿色的将非常适合您的需求.只需声明您的textview如下:
<TextView
android:id="@+id/yourUniqueID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:ellipsize="end" <!--THIS WILL DO FOR YOU-->
android:maxLines="1"
android:text="test"/>