In this tutorial we will create the world oldest game, the Pong, but in our case we give it the name Android Pong. We will use the Android Canvas to draw first a black background rectangle and this will give space for our Android Pong game.
Android Pong is a very simple game, as you can see on the picture. It will have at the left top corner a text. This will show the current points. Next to the text will be the start position of our ball. The player shape is a rectangle at the bottom of the playground.
Continue reading Android Pong
In this tutorial we will learn how to draw text on picture, what we chose before. We can set the size, the position, the color and many other things of the text.
First we have to choose an image and load it into the ImageView. Then we will specify the text with a TextView. The last step is to push the “Draw text on bitmap” Button and the text will be visible on the bitmap in the ImageView.
Let’s start the implementation 🙂
Continue reading Draw text on Bitmap
In this tutorial we will learn a little bit about Canvas. We will draw a lamp on the screen and for this we will have a button which can turn on and turn off our lamp.
Continue reading Draw a Lamp on Canvas