Closed erikswed closed 7 years ago
This is useful when using Picasso like this
Picasso.with(getActivity()) .load(imageURL) .into(streetViewImage, new com.squareup.picasso.Callback() { @Override public void onSuccess() { SquareProgressBar squareProgressBar = (SquareProgressBar) getView().findViewById(R.id.search_street_view_image_SquareProgressBar); ImageView streetViewImage = (ImageView) getView().findViewById(R.id.search_street_view_image); int id = Resources.getSystem().getIdentifier("ic_dialog_alert", "drawable", "android"); squareProgressBar.setImage(streetViewImage.getDrawable()); squareProgressBar.setProgress(50.0); squareProgressBar.setIndeterminate(true); streetViewImage.setImageDrawable(null); }
@Override public void onError() { //do smth when there is picture loading error } });
added in version 1.6.1
This is useful when using Picasso like this
Picasso.with(getActivity()) .load(imageURL) .into(streetViewImage, new com.squareup.picasso.Callback() { @Override public void onSuccess() { SquareProgressBar squareProgressBar = (SquareProgressBar) getView().findViewById(R.id.search_street_view_image_SquareProgressBar); ImageView streetViewImage = (ImageView) getView().findViewById(R.id.search_street_view_image); int id = Resources.getSystem().getIdentifier("ic_dialog_alert", "drawable", "android"); squareProgressBar.setImage(streetViewImage.getDrawable()); squareProgressBar.setProgress(50.0); squareProgressBar.setIndeterminate(true); streetViewImage.setImageDrawable(null); }
@Override public void onError() { //do smth when there is picture loading error } });