【发布时间】:2014-03-17 01:21:01
【问题描述】:
我正在使用包含两个 TextView 的 TableLayout 和 TableRow 创建一个简单的布局。这是代码的一部分。
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:stretchColumns="0">
<TableRow android:id="@+id/myTableRow">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="15dip"
android:text="Short description"/>
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="15dip"
android:text="Large description"/>
</TableRow>
问题是如果 TextView1 中有长文本,则不会显示全文。如何在 TextView1 中显示全文?
【问题讨论】:
-
您希望文本显示为多行并换行吗?
-
如果文字很长,是的,我要显示多行
-
听起来不是很粗鲁,但你应该先用谷歌搜索答案。这个问题有很多解决方案。
标签: java android xml tableview