【问题标题】:How i can show all the paragraph with large amount of text in Animation?我如何在动画中显示所有带有大量文本的段落?
【发布时间】: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


【解决方案1】:

试试这个:

删除最大线 1。

 <TextView
     android:id="@+id/textViewMarqToRight"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginBottom="8dp"
     android:layout_marginTop="8dp" />

你也可以试试:android:inputType="textMultiLine"

【讨论】:

  • 感谢您的回复。不幸的是,这对我不起作用!
猜你喜欢
  • 1970-01-01
  • 2016-04-06
  • 2016-02-09
  • 2019-02-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多