【发布时间】:2018-05-02 01:13:48
【问题描述】:
我想在Animation 中显示我的文字是(例如)的所有文字:
"Lorem Ipsum 是图形、打印、 和出版行业,用于预览布局和视觉模型。”
但是当程序运行时,我在animation 中只能看到"Lorem Ipsum is placeholder text commonly",或者如果我转动设备:“Lorem Ipsum 是图形中常用的占位符文本”,这意味着只能看到一行。
我使用了这个代码:
<TextView
android:id="@+id/textViewMarqToRight"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:maxLines="1" />
但我仍在寻找。
【问题讨论】:
-
您用
android:maxLines="1"限制行数?这就是为什么它只显示文本,直到达到控件的宽度。删除 maxlines 并添加文本换行或换行。 -
去掉
android:maxLIne="1"这一行对于大量的文本总是推荐listView或者RecyclerView。 TextView 渲染大文本很慢。
标签: android