com.squareup.picasso.Picasso.LoadedFrom Java Examples

The following examples show how to use com.squareup.picasso.Picasso.LoadedFrom. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PlayActivity.java    From AnimeTaste with MIT License 6 votes vote down vote up
@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();
    }
}
 
Example #2
Source File: LocalPreviewActivity.java    From Virtualview-Android with MIT License 5 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("LocalPreviewActivity", "onBitmapLoaded " + from);
}
 
Example #3
Source File: VirtualViewApplication.java    From Virtualview-Android with MIT License 5 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("VirtualViewApplication", "onBitmapLoaded " + from);
}
 
Example #4
Source File: RxTangramActivity.java    From Tangram-Android with MIT License 5 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("TangramActivity", "onBitmapLoaded " + from);
}
 
Example #5
Source File: TangramActivity.java    From Tangram-Android with MIT License 5 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("TangramActivity", "onBitmapLoaded " + from);
}
 
Example #6
Source File: BannerTestActivity.java    From Tangram-Android with MIT License 5 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mImageBase.setBitmap(bitmap, true);
    if (mListener != null) {
        mListener.onImageLoadSuccess(bitmap);
    }
    Log.d("TangramActivity", "onBitmapLoaded " + from);
}
 
Example #7
Source File: NotificationService.java    From Klyph with MIT License 5 votes vote down vote up
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);
		}
	});
}
 
Example #8
Source File: CoverItem.java    From Mizuu with Apache License 2.0 5 votes vote down vote up
@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);
    }
}
 
Example #9
Source File: SimpleFakeImageLoaderListener.java    From Contacts with MIT License 4 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{
	
}
 
Example #10
Source File: SimpleFakeImageLoaderListener.java    From Klyph with MIT License 4 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{
	
}
 
Example #11
Source File: RoundedCornerImageView.java    From barterli_android with Apache License 2.0 4 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
    mRoundedCornerImageView.setImageBitmap(bitmap);
}
 
Example #12
Source File: SimpleFakeImageLoaderListener.java    From KlyphMessenger with MIT License 4 votes vote down vote up
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{
	
}