I have a code which allow user to pinch-zoom some images on the screen. I use AbsoluteLayout and imageviews to display the images. In order to achieve this, I made those imageviews have full width/height to its parent. Then when user touch a point, I will detect which image is under that point area, and use bringChildToFront() so it has focus for onTouch() event. When user make a pinch-zoom, I use matrix and its postScale() method, using this code android imageView: setting drag and pinch zoom parameters
Now, what makes me confuse is, how to get the current width/height of the image after postScale()? I've tried:
getDrawable().getIntrinsicHeight()
<-- didnt work. It's always return the original width/heightgetDrawable().getBounds().width()
<-- same as abovegetDrawingCache().getWidth()
<-- this just returns the width/height of the imageview
So, what is the appropriate way to achieve this? Thanks.
-ri