【发布时间】:2019-03-13 21:17:19
【问题描述】:
我有一个 EmojiAppCompatTextView,其 maxLines 设置为 2,省略号设置为 end,但如果在省略号之后有一个表情符号,它仍会将表情符号放在省略号之后,并使文本在两侧被截断,因为表情符号空间不足。
似乎是 EmojiAppCompatTextView 中的一个固有错误,但也许有办法修复它...
它应该是什么样子(省略号之前的表情符号可以正常工作):
实际的样子
有什么想法吗?
textviews xml 是很好的衡量标准:
<android.support.text.emoji.widget.EmojiAppCompatTextView
android:id="@+id/description"
app:fontPath="fonts/Lato-LightItalic.ttf"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:layout_marginLeft="15dp"
android:layout_marginRight="15dp"
android:ellipsize="end"
android:maxLines="2"
android:textAlignment="center"
android:textSize="13sp"/>
【问题讨论】: