Imageview automatically zooming
If i am setting image to imageview from path image view is automatically zooming, can you tell me why this happen? My code is
Glide.clear(imageView);
Glide.with(mContext)
.load(path)
.asBitmap()
// .animate(R.anim.activity_fade_in)
// .dontAnimate()
// .centerCrop()
.signature(new StringSignature(noteGroup.getLastModifiedDate().toString()))
.placeholder(bitmapDrawable)
.skipMemoryCache(false)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.override(width, height)
Possible duplicate of #363 if your placeholder is different aspect than your images. Also default anim: crossFade and default transformation: fitCenter (if you didn't say otherwise in XML).
If i want to change placeholder size how can i achieve this?
Change the drawable or at least its intrinsic size.
If i am update same imageview old image is displayed at that time how can i clear?
But you have a clear there. What is bitmapDrawable? If that's the previous image and you use it as a placeholder, the the load probably failed, because then it leaves the placeholder. Add a listener and log in both methods.
"bitmapDrawable" is my own BitmapDrawable. I am getting bitmap from cache and then convert into drawable and set it.. If the bitmap is not available then i will set the custom drawable to placeholder
Try with a listener to see what's going on.
Tip: In case that cache is Glide cache, you can also try .thumbnail() to do "I am getting bitmap from cache and then convert into drawable and set it.", because it accepts another Glide load.
Let us know if you need further input, I'm definitely inclined to say this is a dupe of #363