[英]How to get facebook friends list using facebook sdk in android
[英]Android. Facebook SDK friends list
使用FQL
我获得了所有朋友的ids
, names
和links to profile pictures
的列表。 我将此信息放在ListView
。 我使用AsyncTask
来获取图像,然后将它们插入到ImageView
中,并将其插入名称旁边的ListView
每个条目中。
我的问题是:放置在ImageViews
的可绘制对象应该怎么做? 将它们保留在内存中一定会抛出OutOfMemory
异常,因为列表可能会很长。 我应该将它们存储在本地缓存中吗? 如果是这样,最好的方法是什么? 我应该使用SharedPreferences
更快吗? 还是应该使用SQLite
? 要么 ...
正确的做法是什么?
PS我实际上不需要代码,只需对所有流程进行解释即可。
您可能需要查看UNIVERSAL IMAGE LOADER 。
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.