动画形象以及在Android道路?道路、形象、动画、Android

2023-09-13 02:06:39 作者:遙遙無遠方

可能重复:   的Andr​​oid,移动位图沿路径?

有没有一种方式与在iPhone上CGPath动画以及对Android路径的ImageView的立场?我已经走遍了网络的解决方案,这一点,但没有人甚至似乎在询问此事。我没有看到在Android文档描述此功能的任何东西。

Is there a way to animate an ImageView's position along a path on the Android as with a CGPath on the iPhone? I have scoured the web for a solution to this, but no one has even seemed to ask about it. I didn't see anything in the Android docs describing this functionality.

推荐答案

我创建动画的一个子类名为PathAnimation,可沿路径动画。

I created a subclass of Animation named PathAnimation, which can animate along a path.

您可以只创建一个新的PathAnimation与路径,并使用它像任何其他动画。

You can just create a new PathAnimation with a Path, and use it like any other Animations.

https://github.com/coocood/PathAnimation