I want to have a ViewGroup with another View in it. The user should be
able to move the other View around the ViewGroup, and fling it away.
However, the inner View shouldnt only move, it should also scale and
so on (so we dont restrain ourselves to just movements). I don't
really know the best way to implement it.

First I though about using a ViewGroup pretty much as it is (i.e. take
advantage of the already-written methods). Then I could do the
flinging with an Animation. However, when I move the View around with
my finger, wouldnt I have to do a requestLayout, since the View
changes size when I move it? Or could I just set a transform?

The other alternative would be to override the draw-method and do most
of the work myself. For instance, when the user moves his/her finger,
I could get a cache of the View and just paint it on the Canvas (with
some transform). However, how would I do the flinging then, without an
Animation? I could use a Scroller/VelocityTracker, but What would
"drive" the repaints?

Which is the best way to do this? Also, I won't have just one View,
but a couple of them, so I'd like the solution to be effective.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to