These are a few more things I want to adjust before finishing the tutorial. First of all, what do we want to do when a user tilts the screen from portrait to landscape? You could either make a different layout for different orientations, make your layout work for both orientations, or just disable landscape mode. We’ll do the latter because it’s the easiest.
Find your AndroidManifest.xml file. This file presents important information to the Android system before it can run the app. One setting that we can set here is what orientations we support. When you open the file, we’ll want to view the raw XML, so click on the AndroidManisfest.xml tab on the bottom.
Inside the activity element, you should see some android properties. Add the property android:screenOrientation=”portrait” (see the screenshot).
Also, we want to use our own icon instead of using the default one given to us. Inside the drawable folders, you’ll see ic_launcher.png. Let’s replace them with these icons in the specified folders:
Depending on the screen density of the device, Android will choose the appropriate icon to use. We didn’t specify an icon for drawable-ldpi. We’ll let Android just scale if needed for low density devices.
That’s it! You’ve make a fully working Hangman App.
You can see the working product on Google Play. You can find it here: