android - Rotating a view and handling redraws -
i using rotationanimation
rotate custom view object (derived directly view
). view object's ondraw()
called repeatedly during animation, , onanimationend
callback called. in callback updating view's backing data object record new rotation.
the problem seeing view object continues have ondraw()
called after onanimationend
callback has been called , has returned. problem because, in callback, update values cause view render contents rotation. since animation still transforming view, end-result briefly over-rotates before snapping correct position rotation transform removed.
so, if animation causes animated view's ondraw()
called after onanimationend
called, how can determine when animation has really finished can update backing object model @ appropriate time?
i'd grateful on this.
for benefit of reading question in future, solution reliably detecting end of animation seems to override onanimationend()
on view
object being animated.
further details can found @ https://stackoverflow.com/a/5110476/67316.
Comments
Post a Comment