Open osemen-remit opened 9 years ago
Hi, I'm trying to make image fit screen in the min_zoom like this:
image.setDisplayType(ImageViewTouchBase.DisplayType.FIT_TO_SCREEN); Glide.with(this) .load(imageUrl) .dontAnimate() .into(new SimpleTarget<GlideDrawable>() { @Override public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> glideAnimation) { float screen_w = getApplicationContext().getResources().getDisplayMetrics().widthPixels; float drawable_w = resource.getIntrinsicWidth(); float min_scale = screen_w / drawable_w; image.setImageDrawable(resource, null, min_scale, 3 * min_scale); } });
for instance screen_widh = 1080 and drawable_width=640 so min_scale = 1.6875 but in any case it scales down to 640.
screen_widh = 1080
drawable_width=640
min_scale = 1.6875
Hi, I'm trying to make image fit screen in the min_zoom like this:
for instance
screen_widh = 1080
anddrawable_width=640
somin_scale = 1.6875
but in any case it scales down to 640.