android - 如何在 Android TextView 中将文本换行到下一行?

标签 android textview word-wrap android-sdk-2.1

我正在使用以下 TextView 在其中显示一些数据:

<TextView android:id="@+id/notificationText" 
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        android:textSize="18sp"
        android:inputType="textMultiLine"
        android:maxLines="2"
        android:layout_paddingRight="20dip"
        android:textColor="#ffffff"/>

我想将文本换行到下一行。我该怎么做?

最佳答案

您必须在您的 xml 中设置 android:scrollHorizo​​ntally="false"

关于android - 如何在 Android TextView 中将文本换行到下一行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4152726/

相关文章:

android - 如何在 TextView 中显示非常大的文本(几兆)?

css - FireFox word 使用 css 中断 OK,但一次一个字母,而不是连字符所在的位置

html - 让一长行字符在 HTML 中换行

javascript - html5 Canvas : auto font size for drawn wrapped rotated text

Android Gmail 无法正确缩放背景图片

android - 去电安卓

android - 如何在 Android 中保存和恢复 ListView 位置

android - 反向 AppBarLayout.ScrollingViewBehavior

android - 调用需要 api 级别 11。当我收到此错误时该怎么办?

textview - SAPUI5 oTable 一行作为链接,其他作为 TextView