Zoom Content In A Relativelayout
I have my application for Android 2.1 where I have a root layout with children's that I can click, move and zoom. Everything is fine, as long as the root layout is not zoomed. I ha
Solution 1:
What you're doing in your dispatchDraw()
, is actually just zooming the drawing of the view, and not the view itself. The location and size of the view (left, top, right, bottom) is still the same, although you see the view's drawing in the canvas is zooming. Try this: zoom your ZoomRelativeLayout
just a little bit, and then interact with the children in their original (non-zoom) location, and see whether the children reacts.
To really zoom a view/viewgroup, you need to transform the actual view, and not only the drawing, i.e. transform the (l,t,r,b) of the view, then requestLayout()
invalidate()
, but this might hit on the performance.
Post a Comment for "Zoom Content In A Relativelayout"