summaryrefslogtreecommitdiff
path: root/opengl/tests/gl_basic/gl_basic.cpp
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-01-31 07:33:48 -0800
committerChet Haase <chet@google.com>2012-01-31 10:50:14 -0800
commitc1ca665827f0c34419a55c005254c1aaa0d58b40 (patch)
tree2c2ffa84065a0d73a341edf79681454765c25654 /opengl/tests/gl_basic/gl_basic.cpp
parented73440416eac56f20054239d6e8480caae1b6d3 (diff)
Add new ViewPropertyAnimator utility methods
Users have requested the ability to sequence ViewPropertyAnimator animations. it is not possible with AnimatorSet, which only takes objects of type Animator (which VPA does not extend). But the AnimatorSet model is not appropriate for VPA anyway, since it is not possible to set up a VPA ahead of time to start later; it's just not the way that VPA is intended to work. Instead, there are now two new methods on VPA, onStart() and onEnd(). These methods take a Runnable which is executed when the animation starts or ends. These methods should allow other VPAs or other arbitrary code to execute at the start or finish of any particular VPA animation, allowing simple sequencing without the overhead of creating listeners and monitoring the cancelation status of the VPA. Additionally, this change adds a new method withLayer() which sets a hardware layer on the VPA's target view for the duration of the animation. This was already possible, but required writing boilerplate code to create a listener and override the start/end methods to add and remove the layer. This utility method makes this common use case much simpler and less error-prone. Change-Id: I819978517e17c647ffb7028063cd0adde68ff691
Diffstat (limited to 'opengl/tests/gl_basic/gl_basic.cpp')
0 files changed, 0 insertions, 0 deletions