简体   繁体   English

Android系统。 Facebook SDK好友列表

[英]Android. Facebook SDK friends list

Using FQL I obtain a list of ids , names and links to profile pictures for all my friends. 使用FQL我获得了所有朋友的idsnameslinks to profile pictures的列表。 I place this information inside a ListView . 我将此信息放在ListView I use AsyncTask to get the images and then I insert them inside an ImageView in each entry of the ListView alongside the name. 我使用AsyncTask来获取图像,然后将它们插入到ImageView中,并将其插入名称旁边的ListView每个条目中。

My question is: what should I do with the drawables I place inside the ImageViews ? 我的问题是:放置在ImageViews的可绘制对象应该怎么做? Keeping them in memory will for certain throw an OutOfMemory exception, as the list can get pretty long. 将它们保留在内存中一定会抛出OutOfMemory异常,因为列表可能会很长。 Should I store them in a local cache? 我应该将它们存储在本地缓存中吗? If so, what is the best way of doing it? 如果是这样,最好的方法是什么? Should I use SharedPreferences being that they are quicker? 我应该使用SharedPreferences更快吗? Or should I use SQLite ? 还是应该使用SQLite Or ... 要么 ...

What is the proper way of doing this? 正确的做法是什么?

PS I don't actually need code, just an explanation on the flow of it all. PS我实际上不需要代码,只需对所有流程进行解释即可。

You may want to look at UNIVERSAL IMAGE LOADER . 您可能需要查看UNIVERSAL IMAGE LOADER

The main features of the Universal ImageLoader for Android are: Android版Universal ImageLoader的主要功能是:

• asynchronous loading and displaying images from the Internet or the SD-card;
• ability of caching loaded images in memory and / or the device's file system;
• ability to monitor the loading process by means of "listeners"
• effective working with the memory while caching images in the memory;
• wide opportunities to customize the tool to fit it to your needs.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM