interesting question :D

On 17 juin, 21:15, Deren <adam.d0...@gmail.com> wrote:
> I want to have a ViewGroup with anotherViewin it. The user should be
> able tomovethe otherViewaround the ViewGroup, and fling it away.
> However, the innerViewshouldnt onlymove, 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 ImovetheViewaround with
> my finger, wouldnt I have to do a requestLayout, since theView
> changes size when Imoveit? 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 theViewand 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 oneView,
> 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