コード例 #1
0
 public Drawable getDrawable() {
   if (downloadFile.exists()) {
     return AttachedImageDrawable.drawableFromPath(this, downloadFile.getFile().getAbsolutePath());
   }
   AvatarData.asyncRequestDownload(userId);
   return getDefaultDrawable();
 }
コード例 #2
0
ファイル: AvatarFile.java プロジェクト: andstatus/andstatus
 @NonNull
 public Drawable getDrawable() {
   Drawable drawable = MyImageCache.getAvatarDrawable(this, downloadFile.getFilePath());
   if (drawable == MyDrawableCache.BROKEN) {
     return getDefaultDrawable();
   } else if (drawable != null) {
     return drawable;
   }
   if (!downloadFile.exists()) {
     AvatarData.asyncRequestDownload(userId);
   }
   return getDefaultDrawable();
 }
コード例 #3
0
ファイル: MyProvider.java プロジェクト: jshifa2003/andstatus
 private void optionallyLoadAvatar(long userId, ContentValues values) {
   if (MyPreferences.showAvatars() && values.containsKey(User.AVATAR_URL)) {
     AvatarData.getForUser(userId).requestDownload();
   }
 }