• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

[TUTORIAL]Theme for Helicopter Game with screnshots

HGDev

Newbie
Oct 24, 2010
40
5
Here is an official tutorial for how to design a theme for "Helicopter Game" which is available in the market.

screen1i.png

screen2x.png


Step 1 - create a new android project using the following settings:
build target 2.2
create activity: main
min sdk version 4


Step 2 - create a new android xml in res/values called theme_config.xml




Fill in these details

Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="red">0</integer>
<integer name="green">186</integer>
<integer name="blue">255</integer>
<integer name="fred">0</integer>
<integer name="fgreen">0</integer>
<integer name="fblue">0</integer>
<bool name="randomSmoke">false</bool>
</resources>

red, blue, and green are for the background color
fred, fgreen, and fblue are for the font color
randomSmoke is a boolean (if true it will rotate the smoke particles randomly - set to true by default)




Step 3 - Edit res/values/strings.xml and add your app name, so it should look something like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="hello">Hello World, main!</string>
<string name="app_name">HGTheme: Shark</string>
</resources>



Step 5 - Edit your AndroidManifest.xml file, add in the following intent filters

Code:
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".main"
android:label="@string/app_name">
   <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <action android:name="com.fkarim.helicopter.THEMES" />
    <category android:name="android.intent.category.DEFAULT" />
   </intent-filter>
   <intent-filter>
    <action android:name="com.fkarim.helicopter.ACTION_PICK_ICON" />
    <category android:name="android.intent.category.DEFAULT" />
   </intent-filter>
</activity>

</application>




Step 6 - make your images and put them in res/drawable
you need the following images:

cavewalls.png (240 x 240)
roof.png(240 x 240) - optional if you want a different colored cave ceiling
copter.png (around 120 x 50)
obstacles.png (50 x 100)
smoke.png (32 x 32)

Step 7 - publish your app
If you need some help for how to publish an app check out this article:
http://www.devx.com/wireless/Article/39972/1954

make sure the name starts with "HGTheme :" (and should have "helicopter game theme" in the description for now) so its easy for people to search for it in the market.


Thanks for reading the tutorial. I will be posting an example theme soon with the source code also.
 
  • Like
Reactions: nyydynasty

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones