Android move object along a path

后端 未结 5 1685
天涯浪人
天涯浪人 2020-12-14 18:33

I ave created a path a circle and displayed both of them on screen as follows:

public void onDraw(Canvas canvas){

        Path sPath = new Path();
        s         


        
5条回答
  •  时光取名叫无心
    2020-12-14 19:10

    The right way to do this is with ContraintLayout and then add a keyframe between the points on the path you want to animate, as described here: https://medium.com/google-developers/defining-motion-paths-in-motionlayout-6095b874d37.

提交回复
热议问题