安卓。 Facebook SDK 好友列表

标签 android facebook-android-sdk

使用 FQL 我获得了我所有 friend 的 idsnames个人资料图片链接 的列表.我将此信息放在 ListView 中。我使用 AsyncTask 获取图像,然后将它们插入 ImageView 中的每个 ListView 条目中的名称旁边。

我的问题是:我应该如何处理放置在 ImageViews 中的可绘制对象?将它们保存在内存中肯定会引发 OutOfMemory 异常,因为列表可能会变得很长。我应该将它们存储在本地缓存中吗?如果是这样,最好的方法是什么?我应该使用 SharedPreferences 因为它们更快吗?还是应该使用 SQLite?或者……

这样做的正确方法是什么?

附言我实际上不需要代码,只需要对所有流程的解释。

最佳答案

你可能想看看UNIVERSAL IMAGE LOADER .

Universal ImageLoader for Android 的主要特点是:

• 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.

关于安卓。 Facebook SDK 好友列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18458558/

相关文章:

Android Facebook 登录按钮空指针异常 fragment

android - SessionState.OPENED_TOKEN_UPDATED 在适用于 Android 的 Facebook SDK 3.0.1b 中意味着什么

android - 无法使用包含的 Facebook SDK 运行

android - Session.getActiveSession() 在启动应用程序时返回 null,尽管我已连接

android - Atomic.h force_clock

Android:带图像的 ListViews 的 Vogella 上下文操作模式

android - 无法打开文件(权限被拒绝)

android - 有没有办法获取GPU信息?

php - 使用php从android访问数据库获取 "<HTML>"而不是查询结果

android - java.lang.NoClassDefFoundError : Failed resolution of: Lcom/facebook/R$style 错误