Android的 - TextView的动力高度问题 [英] Android - TextView dynamic height issue

查看:115
本文介绍了Android的 - TextView的动力高度问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个RelativeLayout的,其layout_height设置为WRAP_CONTENT,并里面,我有他们的文本设置为运行一个TextView。我已设置机器人:layout_height =WRAP_CONTENT到我的TextView,但它似乎并不改变的TextView的高度,即使含量超过1行大

I have a RelativeLayout whose layout_height is set to "wrap_content" and inside that I have a TextView whose text is set at runtime. I have set android:layout_height="wrap_content" to my TextView, but it doesn't seems to change the height of the Textview even if the content is larger than 1 line.

只需要一行并显示1行的高度,和所有其余的行出现垂直滚动字幕时,被我手动拖动这被视为...

It only takes the height of single line and displays 1 line, and all the remaining lines appears to be marquee vertically which is seen when I drag it manually...

所以会是怎样的问题?

推荐答案

TextView的的输入类型变化特性:textMultiline

change property of textview Input Type:textMultiline

您也可以使用此

textView1.setText(Html.fromHtml("Titleeee"));

在这里我发现文本列表fromHtml将转换

here i found a list of text that fromHtml will convert

http://commonsware.com/blog/Android/2010/05/26/html-tags-supported-by-textview.html

这篇关于Android的 - TextView的动力高度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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