Android中的TextView最多9000个字符? [英] Max 9000 characters in Android TextView?

查看:300
本文介绍了Android中的TextView最多9000个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目有大量的文字,大多是围绕8500至9500个字符。
我想显示在一个可滚动的TextView,而是把文字在一个TextView的时候,它似乎被截断为9000个字符的最大值,而(原)String对象可以容纳更多。有没有一种办法来扩展这个数字?绝对的限制的TextView的大小没有参数已设置。
先谢谢了。

I have items with a lot of text, mostly around 8500 to 9500 characters. I want to display that in a scrollable textview, but when put the text in a TextView, it seems to be truncated to a max of 9000 characters, while a (the original) String object can hold more. Is there a way to extend this number? Absolutely no parameters on restricting the size of the TextView has been set. Thanks in advance.

推荐答案

下面是一个的链接基本上说:

Here is a link which basically says:

答案是:你有多少内存可分配?当然
  系统需要分配资源来衡量和排版和渲染
  所有的文字。如果它太长,考虑显示文本
  页面或块。

The answer is "how much memory can you allocate?" Of course the system needs to allocate resources to measure and typeset and render all of that text. If it's too long, consider showing the text in pages or chunks.

所以,如果你的字符串中有50000个字符,显示它在9000字块。

So if your string has 50000 characters, show it in 9000 character chunks.

这篇关于Android中的TextView最多9000个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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