Java 类com.squareup.picasso.Picasso.LoadedFrom 实例源码

项目:AnimeTaste    文件:PlayActivity.java   
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom arg1) {
    mDetailImageView.setImageBitmap(bitmap);
    mDetailPicture = bitmap;
    mLoadingGif.setVisibility(View.INVISIBLE);
    mPrePlayButton.setVisibility(View.VISIBLE);
    ByteArrayOutputStream bytes = new ByteArrayOutputStream();
    mDetailPicture.compress(CompressFormat.JPEG, 100, bytes);

    File file = new File(mContext.getCacheDir(), "toshare.jpg");
    try {
        if (file.exists()) {
            file.delete();
        }
        file.createNewFile();
        FileOutputStream fo = new FileOutputStream(file);
        fo.write(bytes.toByteArray());
        fo.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
项目:Virtualview-Android    文件:VirtualViewApplication.java   
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("VirtualViewApplication", "onBitmapLoaded " + from);
}
项目:Tangram-Android    文件:TangramActivity.java   
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("TangramActivity", "onBitmapLoaded " + from);
}
项目:atlant-android    文件:PicassoTargetUtils.java   
private void createTarget() {
  target = new Target() {
    @Override
    public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
      materialProgressBar.setVisibility(View.INVISIBLE);
      imageView.setScaleType(ScaleType.CENTER_CROP);
      imageView.setColor(Color.TRANSPARENT);
      imageView.setImageBitmap(bitmap);
      imageView.invalidate();
      if (callBack != null) {
        callBack.onBitmapLoaded();
      }
    }

    @Override
    public void onBitmapFailed(Drawable errorDrawable) {
      materialProgressBar.setVisibility(View.INVISIBLE);
      imageView.setScaleType(ScaleType.CENTER_INSIDE);
      imageView.setImageDrawable(errorDrawable);
      if (callBack != null) {
        callBack.onBitmapFailed();
      }
    }

    @Override
    public void onPrepareLoad(Drawable placeHolderDrawable) {
      if (callBack != null) {
        callBack.onPrepareLoad();
      }
    }
  };
}
项目:Klyph    文件:NotificationService.java   
private void sendNotification(final Notification notification, final boolean  sendDetails)
{
    final Builder builder = KlyphNotification.getBuilder(service.get(), true);

    builder.setContentTitle(notification.getSender_name());
    builder.setContentText(notification.getTitle_text());
    builder.setTicker(String.format("%1$s\n%2$s", notification.getSender_name(), notification.getTitle_text()));

    ImageLoader.loadImage(notification.getSender_pic(), new SimpleFakeImageLoaderListener() {

        @Override
        public void onBitmapFailed(Drawable drawable)
        {
            if (sendDetails)
                KlyphNotification.sendNotification(service.get(), builder, notification);
            else
                KlyphNotification.sendNotification(service.get(), builder);
        }

        @Override
        public void onBitmapLoaded(Bitmap bitmap, LoadedFrom arg1)
        {
            builder.setLargeIcon(bitmap);
            if (sendDetails)
                KlyphNotification.sendNotification(service.get(), builder, notification);
            else
                KlyphNotification.sendNotification(service.get(), builder);
        }
    });
}
项目:Mizuu    文件:CoverItem.java   
@Override
public void onBitmapLoaded(Bitmap arg0, LoadedFrom arg1) {
    cover.setImageBitmap(arg0);
    try {
        ObjectAnimator.ofFloat(cover, "alpha", 0f, 1f).setDuration(animationDuration).start();
    } catch (Exception e) {
        // Some devices crash at runtime when using the ObjectAnimator
        cover.setAlpha(1f);
    }
}
项目:Klyph    文件:SimpleFakeImageLoaderListener.java   
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{

}
项目:traktr-old    文件:CoverItem.java   
@Override
public void onBitmapLoaded(Bitmap arg0, LoadedFrom arg1) {
    cover.setBackgroundColor(Color.TRANSPARENT);
    cover.setImageBitmap(arg0);
    ObjectAnimator.ofFloat(cover, "alpha", 0f, 1f).setDuration(ANIMATION_DURATION).start();
}
项目:barterli_android    文件:RoundedCornerImageView.java   
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mRoundedCornerImageView.setImageBitmap(bitmap);
}
项目:KlyphMessenger    文件:SimpleFakeImageLoaderListener.java   
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{

}
项目:p1-android    文件:FeedItem.java   
@Override
public void onSuccess(Bitmap arg0, LoadedFrom arg1) {
    imageView.setImageBitmap(arg0);
}