How to set background image in android game
This is simple step by step tutorial for “How to set background image in android game”. Today we will learn step by step instructions to set background of your android game. We will use android studio IDE for creating a simple project. The very first step is create a simple project.
Step (2) How to set background image in android game
Configure your project, this is the step where we need to fill application name. The second entry is company domain. if you have domain like wikistack.com, we can fill this name. However if we fill like com.wikistack it should be unique.
Step 3 ( Target Your Android device )
Step 3 ( Add an Activity to mobile )
In this step select blank activity.
Step 4 ( Customize the Activity)
This the last step. The default activity class name is MainActivity. MainActivity is a Java class.
Step 4 ( Set Background )
At this stage we have ready to build and run project. android studio organize the project into an certain structure. We can see the project structures on left side of project sub section of android studio. Now we have to follow following steps to set background.
- Prepare your background image , say it is background.png.
- Copy the background image ( background.png).
- Paste into the drawable ( This is inside the project structure see below image)
After completing this wen we run the program we can observer the game background.