2

I am implementing a piano tiles clone for an educational purposes. I've created 5 Views (that's the rows) which extends LinearLayout. Each one of them has 4 childs (that's the 4 tiles).

I am using an Handler for the animation, and change the Y property manually every "tick". Problem is, the animation is somewhat twitching and not smooth.

I have two questions:

  1. Is that a good design? I know for example about surfaceView as alternative for drawing and animating but that seemed to me a bit complicated for my cause.
  2. How would you animate those tiles? currently I use an Handler (actually I was guided on another thread to use Animation. What do you think the most feet to my case?

Thanks!

NebulaeGuy
  • 169
  • 9
AngryOliver
  • 397
  • 1
  • 4
  • 18

1 Answers1

1

I like your grid idea, but you may have to change it if you would like the tiles to be procedurally generated. Also, here is a thread on how to make animations smoother in Java (This can probably apply to Android too): How can I make a Java Swing animation smoother

Here is one for Android: Moving animation not smooth in android

Also, I feel you are a bit behind, the Piano Tiles phase has disappeared now, much like Flappy bird.

Community
  • 1
  • 1
NebulaeGuy
  • 169
  • 9
  • Also, for a more reliable answer, I would recommend splitting your question in to two questions for a wider range of answers. If you do not find an answer that works, SE Programmers could be a suitable place for your question. – NebulaeGuy Jul 12 '14 at 22:09