Android的 - 查看过大,以适应绘图缓存 [英] Android - View too large to fit into drawing cache

查看:295
本文介绍了Android的 - 查看过大,以适应绘图缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个扩展自定义视图的类,它有画一条线,并像一个时间表一些文本。结果它可以是pretty长,所以我把这个观点到滚动视图。
结果它工作正常,但如果线路太长的视野中消失,成为无形的(滚动视图滚动),并显示logcat中我这个消息:

I have a class that extends custom view, it has to draw a line and some text like a timeline.
It can be pretty long so I put the view into a scrollview.
It works fine but if the line is too long the view disappears and become invisible (the ScrollView scrolls) and Logcat shows me this message:

07-02 15:56:05.209: W/View(7364): View too large to fit into drawing cache, needs 4392400 bytes, only 4096000 available

我怎样才能解决这个问题?结果
先谢谢了。

How can i solve this problem?
Thanks in advance.

推荐答案

有没有办法来增加RAM,或许你可以画少。删除滚动型,检测到触摸查看,得出唯一可见的部分。

There's no way to increase RAM, perhaps you can draw less. Remove ScrollView, detect touch on View, draw only visible portion.

这篇关于Android的 - 查看过大,以适应绘图缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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