简体   繁体   English

如何从 animationEnd 上的 AnimatorListener 获取 tranlationX 和 translationY?

[英]How to get tranlationX and translationY from AnimatorListener on animationEnd?

p0.toString() method gives: p0.toString()方法给出:

09-11 10:28:19.904 27113-27113/com.android.testapp D/TAG:
onAnimationEnd:AnimatorSet@4a04036{
    translationX:  10.0  1138.7 
    translationY:  300.0  364.0  
}

How can I get translationX and translationY from p0 ?如何从p0获得translationXtranslationY

I think, it was impossible get translationX and translationY from p0:Animator.我认为,不可能从 p0:Animator 获得 translationX 和 translationY。 So I get it from target view's .x and .y coordinations, so I user ObjectAnimator.所以我从目标视图的 .x 和 .y 坐标中得到它,所以我使用 ObjectAnimator。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM