列表视图使用位图 [英] List View using bitmap

查看:95
本文介绍了列表视图使用位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图创建一个列表,其中整个列表视图不显示在屏幕上的位图。我使用

I have been trying to create a bit map of a list view, where the entire list view is not visible on the screen. I am using

Bitmap mBitmap = fullView.getDrawingCache();

创建位图。它的工作原理确定为列表视图中的一部分,这是在屏幕上可见,但不适用于isn't.I想知道是否可以创建一个列表视图的位图,而不必完全显示在屏幕上的部分。所有的建议和(或)解决方案是AP preciated。

to create bitmap. It works ok for the part of list view that is visible on the screen but, not for the part that isn't.I would like to know if a bitmap of a list view can be created without having to display it completely on the screen. All suggestions and or solutions are appreciated.

推荐答案

由于Android只汲取什么是可见的,可能的想法是采取件的位图,然后组的位图到一个单一的。你可以先把前n项的位图。然后使用scrollTo方法滚动超出previous n项,并得到位图下一个n项。这样你就可以得到整个列表视图的位图。

As android only draws what is visible, may idea would be to take bitmaps in pieces and then group the bitmaps into a single one. You could first get the bitmap of first n items. Then use the scrollTo method to scroll beyond the previous n items and get the bitmap for the next n items. This way you can get bitmap of the whole list view.

这篇关于列表视图使用位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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