Reputation: 907
In my case I have RelativeLayout
which contains many EditText
boxes and lines between them.
What I need now is to get Zoom work on this. I have googled a lot(in days) and I haven't found the answer how to do this.
Firstly it would be easiest to all of us if I start with few questions, so:
ImageView, MapView and WebView
?Edit: And I tried to use Animation and there was some kind of scale which worked pretty well, but the only and fatal problem was that EditTextBoxe's Touching bounds didn't scale.. Or even move, so they were on original position and size. Is there any suggestions to this one?
Upvotes: 0
Views: 3291
Reputation: 64700
You should look at http://code.google.com/p/android-pinch/source/browse/#svn%2Ftrunk%2Fsrc%2Fcom%2Fnikkoaiello%2Fmobile%2Fandroid%253Fstate%253Dclosed for a couple of implementations if you haven't already: I get the sense that you are right and those 3 are the only Views for which there is any native support for the pinch zoom metaphor.
As far as the bounds not scaling without more knowledge about the animations you are using that appears to be a common problem: does overriding the animation and setting http://developer.android.com/reference/android/view/animation/Animation.html#willChangeBounds%28%29 to return true help in any way?
Upvotes: 0
Reputation: 91351
RelativelyLayout doesn't even zoom at all. Or scroll. You are looking in the wrong place. You would need to put your view hierarchy in a container that does this. If it is going to zoom, it will be tricky because the container will need to apply a scale factor to both the drawing and touch events going through it.
Upvotes: 1