View v = inflater.inflate(R.layout.places_layout, null); placeImage = (ImageView) v.findViewById(R.id.place_badge); ... Picasso picasso = Picasso.with(getApplicationContext()); picasso.invalidate(market.getId()); picasso.load(markerPlaces.get(marker.getId())) .placeholder(R.drawable.bus) .into(placeImage);
File file = new File(fileName); Picasso picasso = Picasso.with(context); picasso.invalidate(file); picasso.load(file).into(imageView);
@Override public void clear() { for (int i = 0; i < getItemCount(); i++) { mPicasso.invalidate(getItem(i)); } } }
public void exitWithAnimation() { runOnUiThread(() -> { Picasso.with(EmulationActivity.this) .invalidate(mScreenPath); Picasso.with(EmulationActivity.this) .load(mScreenPath) .noFade() .noPlaceholder() .into(mImageView, new Callback() { @Override public void onSuccess() { showScreenshot(); } @Override public void onError() { finish(); } }); }); }
private void progressImageViewAutoHide() { progressImageViewAutoHide = (ProgressImageView) findViewById(R.id.progress_image_view); progressImageViewAutoHide.showLoading(); Picasso picasso = Picasso.with(MainActivity.this); picasso.invalidate("http://blog.alura.com.br/wp-content/uploads/2016/06/java_capa.jpg"); picasso.load("http://blog.alura.com.br/wp-content/uploads/2016/06/java_capa.jpg") .transform(new CircleTransform()) .memoryPolicy(MemoryPolicy.NO_CACHE) .networkPolicy(NetworkPolicy.NO_CACHE) .into(progressImageViewAutoHide); }
private void progressImageViewFromAEvent() { hideFromAEvent = (ProgressImageView) findViewById(R.id.progress_image_view_hide); hideFromAEvent.showLoading().withAutoHide(false).withBorderColor(Color.BLUE); Picasso picasso = Picasso.with(MainActivity.this); picasso.invalidate("https://randomuser.me/api/portraits/men/83.jpg"); picasso.load("https://randomuser.me/api/portraits/men/83.jpg") .transform(new CircleTransform()) .memoryPolicy(MemoryPolicy.NO_CACHE) .networkPolicy(NetworkPolicy.NO_CACHE) .into(hideFromAEvent); new Timer().schedule(new TimerTask() { @Override public void run() { hideFromAEvent.hideLoading(); } }, 5000); }
private void progressImageColorAndSize() { progressImageColorAndSize = (ProgressImageView) findViewById(R.id.progress_image_view_color_and_size); progressImageColorAndSize.showLoading().withAutoHide(false).withBorderColor(Color.RED).withBorderSize(10); Picasso picasso = Picasso.with(MainActivity.this); picasso.invalidate("https://randomuser.me/api/portraits/men/83.jpg"); picasso.load("https://randomuser.me/api/portraits/men/83.jpg") .transform(new CircleTransform()) .memoryPolicy(MemoryPolicy.NO_CACHE) .networkPolicy(NetworkPolicy.NO_CACHE) .into(progressImageColorAndSize); new Timer().schedule(new TimerTask() { @Override public void run() { progressImageColorAndSize.hideLoading(); } }, 5000); }
private void progressImageViewOffSet() { progressImageOffSet = (ProgressImageView) findViewById(R.id.progress_image_view_offset); progressImageOffSet.showLoading().withAutoHide(false).withBorderColor(Color.BLUE).withOffset(10); Picasso picasso = Picasso.with(MainActivity.this); picasso.invalidate("https://randomuser.me/api/portraits/men/83.jpg"); picasso.load("https://randomuser.me/api/portraits/men/83.jpg") .transform(new CircleTransform()) .memoryPolicy(MemoryPolicy.NO_CACHE) .networkPolicy(NetworkPolicy.NO_CACHE) .into(progressImageOffSet); new Timer().schedule(new TimerTask() { @Override public void run() { progressImageOffSet.hideLoading(); } }, 5000); }
Picasso.with(this).invalidate(mUploadImageUri); Picasso.with(this).load(mUploadImageUri).resize(ScreenUtils.dp2px(200f), ScreenUtils.dp2px(200f)).centerCrop().into(mImageView); hasImage = true;
Picasso.get().invalidate(UIUtils.getIconUrl(getActivity(), channel.getIcon()));