Android animate character in SurfaceView

后端 未结 2 736
失恋的感觉
失恋的感觉 2021-01-14 17:34

I want to animate a character (for eg run a dog) on screen. AnimationDrawable seemed a perfect fit for this, and AnimationDrawable requires an ImageView. How do I add and mo

2条回答
  •  隐瞒了意图╮
    2021-01-14 17:57

    With a SurfaceView it is your responsibility to draw everything within it. You do not need AnimationDrawable or any view to render your character on it. Take a look onto Lunar Lander example game from Google.

提交回复
热议问题