开发者

Caching data when switching to full screen

I've got an activity which has a gallery that is backed by an Adapter with data that was slowly retrieved over the network. I want to be able to switch to full screen and use a gallery backed by the same adapter. I don't want to have to reload all the data over the network just because I switched to full scr开发者_开发百科een mode. Do I need to cache the data (about 100 objects, each of which contains a string and a few images) temporarily and then reload it in the full screen activity or is there a better way? I tried getting a reference to the original gallery in the full screen activity, but findViewById() returned null.


For images you could use LRU caching(both on disk and in memory). As for objects - use Serialization.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜