所以我有一个方法(方法 1),它返回AnimatorSet
另一个方法(方法 2)。在方法 2 中,我想在 中挑选一些Animator
' AnimatorSet
,并相互独立地使用它们。
我找到了该.getChildAnimations()
方法,它应该以某种方式帮助我,但不幸的是,我不知道如何ArrayList<Animator>
正确工作。我尝试.toString()
在 中的项目上使用 a ArrayList
,所以我可能能够Animators
通过标题识别,但是返回android.animation.RevealAnimator@.....
,所以基本上没有什么用处。
ArrayList<Animator> animatorList = animatorSet.getChildAnimations();
for (Animator a : animatorList) {
Log.d(TAG, "show: "+a.toString());
}
结果:
05-08 14:02:25.177 11044-11044/com.example.tim.timapp D/CStA: show: android.animation.RevealAnimator@17e554b
05-08 14:02:25.177 11044-11044/com.example.tim.timapp D/CStA: show: android.animation.RevealAnimator@3c95b28
05-08 14:02:25.177 11044-11044/com.example.tim.timapp D/CStA: show: android.animation.RevealAnimator@f723041
那么,我如何在 中识别Animators
,AnimatorSet
以便我可以选择我需要的那些?