I want to get the rectangle object that will wrap the Drawable of ImageView instead of the rectangle that will wrap the ImageView. I will use that rectangle to draw some fancy rectangle around Drawable. How can I get that rectangle?
Rect rect = new Rect();
ImageView iV = new ImageView();
rect.left = iV.getLeft();
rect.top = iV.getTop();
rect.bottom = iV.getBottom();
rect.right = iV.getRight();
Now you have your rectangle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With