【发布时间】:2016-04-20 19:58:16
【问题描述】:
我的 TextView 定义如下:
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
android:text="This is very long text"
android:textSize="34pt"/>
使用 API 级别 14/15 这会导致剪切整个单词“very”,而我实际上已显示文本“This is”,但我需要剪切此文本,如“This is ver”。
有人可以问我如何实现这种行为吗?
【问题讨论】:
-
使用这个插件github.com/grantland/android-autofittextview 太有用了
-
如果想看全文“marquee's”,可以使用。 stackoverflow.com/questions/13313996/…