Ejemplo n.º 1
0
 public Drawable getDrawable() {
   if (downloadFile.exists()) {
     return AttachedImageDrawable.drawableFromPath(this, downloadFile.getFile().getAbsolutePath());
   }
   AvatarData.asyncRequestDownload(userId);
   return getDefaultDrawable();
 }
 private void setAttachedImage(Cursor cursor, ImageView view) {
   Drawable drawable = AttachedImageDrawable.drawableFromCursor(cursor);
   if (drawable != null) {
     view.setVisibility(View.VISIBLE);
     view.setImageDrawable(drawable);
   } else {
     view.setVisibility(View.GONE);
   }
 }