On Wed, Nov 24, 2010 at 3:52 PM, Jason Van Anden
<[email protected]> wrote:
> I am trying to roll my own sliding drawer that can be opened 5%, 25% and
> 100%.
>
> When I animate my view to the new position, the animation moves, but when
> the animation is finished the view jumps back to its original location.  Is
> it possible to animate a view to a new position or am I attempting to do
> something it is not meant to do?

It is possible to "animate a view to a new position"...so long as you
realize that you've only done half the work.

Animations do not magically rewrite the rules of layouts. The
animation will temporarily draw the pixels for the View in the new
position (and waypoints in between original and new). However, when
the animation ends, you need to do something to adjust your layout to
cause your View to stick in the new spot. AnimationListener is how you
find out when the animation ends.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to