This image will be drawn in ImageView based on the given attributes, for example, height, width, scaling factors, etc.
So, the getDrawingRect () method gives the entire ImageView area. If you change the stretchable inside the ImageView, the blue area may change depending on the image properties and image properties. But the yellow area will not change, since it is fixed and based only on ImageView, regardless of the image displayed.
I think there is no chance to get a Rect bitmap. I donβt think my answer is 100% correct, this is just a suggestion.
You can get information about the blue color area from the Drawing Cache . Try it once.
I hope this can help you.
Yugandhar babu
source share