获取对象的位置时,动画采用的是Android完整 [英] Get location of object when animation is complete in android

查看:92
本文介绍了获取对象的位置时,动画采用的是Android完整的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法动画后找到了我的动画片对象的最终位置?比方说,我是用动画的位置在ImageView的父母为(0,0 - 20,20)。使用TranslateAnimation和ScaleAnimation超过1秒钟setFillAfter(真)

Is there a way to find out the final location of my animated "object" after the animation? Let's say I am animating an ImageView with location in parent as (0,0 - 20,20) using TranslateAnimation and ScaleAnimation over 1 second with setFillAfter(true).

如何,我觉得这个对象的最终位置(因为查看位置本身不移动)?我需要根据一个用户输入来继续从该点的动画。

How to I find the final location of this "object" (since the View location itself does not move)? I need to continue the animation from this point based on an user input.

推荐答案

我想它了 - 在动画使用getTransformation和矩阵应用到最初的矩形,以获得最终的目的地。

I figured it out - use getTransformation on the Animation and apply the Matrix to the initial Rectangle, to obtain the final destination.

这篇关于获取对象的位置时,动画采用的是Android完整的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆