Example #1
0
 @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();
 }
Example #2
0
 public static Drawable getDefaultDrawable() {
   return MyImageCache.getStyledDrawable(
       R.drawable.ic_person_black_36dp, R.drawable.ic_person_white_36dp);
 }