简体   繁体   English

在 Android 应用程序中显示 Facebook 配置文件图片的最佳实践

[英]Best Practice For Displaying Facebook Profile Pictures In an Android App

I want to have an android app that displays users' facebook profile pictures.我想要一个显示用户 facebook 个人资料图片的 android 应用程序。 I'm wondering what the bast practice is for this purpose.我想知道为此目的的基本做法是什么。 Should I make ImageView load pictures at runtime from facebook URI?我应该让 ImageView 在运行时从 facebook URI 加载图片吗? or save the pictures to my own server and send them to the devices in bytes on demand?还是将图片保存到我自己的服务器并按需以字节为单位发送到设备? or cache them locally?或在本地缓存它们? What is the "common" way of doing this?这样做的“常见”方式是什么?

Personally, I would cache them locally unless you intend to have hundreds of them.就个人而言,除非您打算拥有数百个,否则我会将它们缓存在本地。 It would make the app work offline and display the images a lot faster.这将使应用程序离线工作并更快地显示图像。

You would have to update them regularly though as a user's Facebook profile picture can change fairly often.您必须定期更新它们,因为用户的 Facebook 个人资料图片可能会经常更改。

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

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