多行的TextView的Andr​​oid的? [英] Multiline TextView in Android?

查看:128
本文介绍了多行的TextView的Andr​​oid的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不喜欢低于 XML

<TableRow>
<TextView android:id="@+id/address1"
android:layout_width="fill_parent" 
android:layout_height="wrap_content"
android:gravity="left"
android:maxLines="4" 
android:singleLine="false"              
android:text="Johar Mor, Gulistan-e-Johar, Karachi" >
</TextView> 
</TableRow>

这是不工作的多行,和我使用 TableLayout ,,,

It is not working for multiline, and I am using TableLayout,,,

那么,什么是错误的,我在这里做什么?

so what is mistake I am doing here?

推荐答案

TextView的将是多线的时候,它不会得到足够的空间,以适应单行和singLine未设置为true。

TextView will be multi line when it wont get enough space to fit in the single line and singLine not set to true.

如果不慎一行的空间,它不会是多行。

If it gets the space in one line it wont be multi line.

这篇关于多行的TextView的Andr​​oid的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆