我正在使用带有 android:maxLines="1" 的 android TextView 并尝试使用所有类型的 ellipsize,但没有一种不满足我的要求。我想省略文本而不在 and 处添加点并且不剪切整个最后一个单词。我想只删掉最后一个单词的字符而不丢失整个单词
<androidx.appcompat.widget.AppCompatTextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tv_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="4dp"
android:orientation="vertical"
android:maxLines="1"
/>