As you can see, GameView is the screen where the “green ball” moving. GameView will also catch all the user interactions event.
Hence, we cannot let the GameView take responsibility for calculating and drawing the green ball –> We need to create a new Thread to handle it!
Â
Create  GameThread class:
Finally, in MainActivity, call  setContentView(new GameView(this, null))
Enjoy the result:
http://www.mediafire.com/download.php?8nca1ra07nwp554
Comments powered by Disqus.