Android显示多行文字,Android并在TableRow中的TextView中显示多行文本

在Android开发中,遇到TableLayout中TextView无法自动换行的问题。已尝试设置多个属性如ellipsize、singleLine、maxLines等,但文本依然被挤压在一行内。问题可能与TableRow的处理方式有关。寻求解决方案,如何让第二个TextView能正确地包裹多行文本。
摘要由CSDN通过智能技术生成

我显示一个TableLayout与行如下:

xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"

android:layout_height="wrap_content">

android:layout_width="match_parent"

android:layout_height="wrap_content">

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:id="@+id/one"

android:layout_marginLeft="10dip"

android:textColor="#B0171F" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_below="@id/one"

android:id="@+id/two"

android:layout_marginLeft="10dip"

android:ellipsize="none"

android:singleLine="false"

android:scrollHorizontally="false"

android:maxLines="10"

android:textColor="@android:color/black" />

我碰到这一切,我可以在这里找到,可以想到允许文本包装在许多行,但无济于事:文本总是强制为一行,运行在屏幕上。这可能是重要的,我在这里工作在TableRow,就我可以告诉这没有在这个网站上对待。

那么,如何强制我的第二个TextView包装到多行?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值