I have an issue. I use Glide 3.8.0.
I need to download image from server and put it to a marker on google maps.
Glide.with(getBaseActivity())
.load(place.getIconUrl())
.asBitmap()
.fitCenter()
.into(new SimpleTarget<Bitmap>(50,50) {
@Override
public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
map.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromBitmap(resource))
.position(place.getLatLng()));
}
@Override
public void onLoadFailed(Exception e, Drawable errorDrawable) {
map.addMarker(new MarkerOptions()
.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_marker_default_logo))
.position(place.getLatLng()));
}
});
Also, i have default logo if some loading error, its size 50x50.
I test loading on 2 devices - nexus 5 and no name device (i dont know screen resolution and screen size, but size is almost same as nexus 5)
On the different device i have different size of marker logo and i experiment with
.into(new SimpleTarget<Bitmap>(50,50)
sizes
Nexus 5, 50x50 very smaller comparing with default logo, 75x75 is smaller then default, 150x150 same as default
No name device: 75x75 same as default logo, 50x50 smaller then default
So, what can i do with Glide to make it same on the different device and as same as default logo 50x50 (default logo looks same on the different devices)