use of net.osmand.plus.utils.PicassoUtils in project OsmAnd by osmandapp.
the class DescriptionCard method setupImage.
private void setupImage(final String imageUrl) {
if (imageUrl == null) {
return;
}
final PicassoUtils picasso = PicassoUtils.getPicasso(app);
RequestCreator rc = Picasso.get().load(imageUrl);
final AppCompatImageView image = view.findViewById(R.id.main_image);
rc.into(image, new Callback() {
@Override
public void onSuccess() {
picasso.setResultLoaded(imageUrl, true);
AndroidUiHelper.updateVisibility(image, true);
}
@Override
public void onError(Exception e) {
picasso.setResultLoaded(imageUrl, false);
}
});
}
use of net.osmand.plus.utils.PicassoUtils in project Osmand by osmandapp.
the class DescriptionCard method setupImage.
private void setupImage(final String imageUrl) {
if (imageUrl == null) {
return;
}
final PicassoUtils picasso = PicassoUtils.getPicasso(app);
RequestCreator rc = Picasso.get().load(imageUrl);
final AppCompatImageView image = view.findViewById(R.id.main_image);
rc.into(image, new Callback() {
@Override
public void onSuccess() {
picasso.setResultLoaded(imageUrl, true);
AndroidUiHelper.updateVisibility(image, true);
}
@Override
public void onError(Exception e) {
picasso.setResultLoaded(imageUrl, false);
}
});
}
use of net.osmand.plus.utils.PicassoUtils in project Osmand by osmandapp.
the class GpxReadDescriptionDialogFragment method setupImage.
private void setupImage(View view) {
if (imageUrl == null) {
return;
}
final OsmandApplication app = getMyApplication();
final PicassoUtils picasso = PicassoUtils.getPicasso(app);
final AppCompatImageView image = view.findViewById(R.id.main_image);
RequestCreator rc = Picasso.get().load(imageUrl);
WikivoyageUtils.setupNetworkPolicy(app.getSettings(), rc);
rc.into(image, new Callback() {
@Override
public void onSuccess() {
picasso.setResultLoaded(imageUrl, true);
AndroidUiHelper.updateVisibility(image, true);
}
@Override
public void onError(Exception e) {
picasso.setResultLoaded(imageUrl, false);
}
});
}
use of net.osmand.plus.utils.PicassoUtils in project OsmAnd by osmandapp.
the class GpxReadDescriptionDialogFragment method setupImage.
private void setupImage(View view) {
if (imageUrl == null) {
return;
}
final OsmandApplication app = getMyApplication();
final PicassoUtils picasso = PicassoUtils.getPicasso(app);
final AppCompatImageView image = view.findViewById(R.id.main_image);
RequestCreator rc = Picasso.get().load(imageUrl);
WikivoyageUtils.setupNetworkPolicy(app.getSettings(), rc);
rc.into(image, new Callback() {
@Override
public void onSuccess() {
picasso.setResultLoaded(imageUrl, true);
AndroidUiHelper.updateVisibility(image, true);
}
@Override
public void onError(Exception e) {
picasso.setResultLoaded(imageUrl, false);
}
});
}
Aggregations