@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();
}
}
java类com.squareup.picasso.Picasso.LoadedFrom的实例源码
PlayActivity.java 文件源码
项目:AnimeTaste
阅读 28
收藏 0
点赞 0
评论 0
VirtualViewApplication.java 文件源码
项目:Virtualview-Android
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
mImageBase.setBitmap(bitmap, true);
if (mListener != null) {
mListener.onImageLoadSuccess(bitmap);
}
Log.d("VirtualViewApplication", "onBitmapLoaded " + from);
}
TangramActivity.java 文件源码
项目:Tangram-Android
阅读 24
收藏 0
点赞 0
评论 0
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
mImageBase.setBitmap(bitmap, true);
if (mListener != null) {
mListener.onImageLoadSuccess(bitmap);
}
Log.d("TangramActivity", "onBitmapLoaded " + from);
}
PicassoTargetUtils.java 文件源码
项目:atlant-android
阅读 21
收藏 0
点赞 0
评论 0
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();
}
}
};
}
NotificationService.java 文件源码
项目:Klyph
阅读 38
收藏 0
点赞 0
评论 0
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);
}
});
}
CoverItem.java 文件源码
项目:Mizuu
阅读 20
收藏 0
点赞 0
评论 0
@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);
}
}
SimpleFakeImageLoaderListener.java 文件源码
项目:Klyph
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{
}
CoverItem.java 文件源码
项目:traktr-old
阅读 23
收藏 0
点赞 0
评论 0
@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();
}
RoundedCornerImageView.java 文件源码
项目:barterli_android
阅读 23
收藏 0
点赞 0
评论 0
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from) {
mRoundedCornerImageView.setImageBitmap(bitmap);
}
SimpleFakeImageLoaderListener.java 文件源码
项目:KlyphMessenger
阅读 25
收藏 0
点赞 0
评论 0
@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom from)
{
}
FeedItem.java 文件源码
项目:p1-android
阅读 22
收藏 0
点赞 0
评论 0
@Override
public void onSuccess(Bitmap arg0, LoadedFrom arg1) {
imageView.setImageBitmap(arg0);
}