1. Are you ready for the Galaxy S20? Here is everything we know so far!

[TUTORIAL]Theme for Helicopter Game with screnshots

Discussion in 'Android Themes' started by HGDev, Oct 29, 2010.

  1. HGDev

    HGDev Newbie
    Thread Starter

    Here is an official tutorial for how to design a theme for "Helicopter Game" which is available in the market.

    [​IMG]
    [​IMG]

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

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

    [​IMG]
    [​IMG]

    Fill in these details

    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <resources>
    4. <integer name="red">0</integer>
    5. <integer name="green">186</integer>
    6. <integer name="blue">255</integer>
    7. <integer name="fred">0</integer>
    8. <integer name="fgreen">0</integer>
    9. <integer name="fblue">0</integer>
    10. <bool name="randomSmoke">false</bool>
    11. </resources>
    12.  
    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)

    [​IMG]


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

    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <resources>
    4. <string name="hello">Hello World, main!</string>
    5. <string name="app_name">HGTheme: Shark</string>
    6. </resources>
    7.  
    [​IMG]

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

    Code (Text):
    1.  
    2. <application android:icon="@drawable/icon" android:label="@string/app_name">
    3. <activity android:name=".main"
    4. android:label="@string/app_name">
    5.    <intent-filter>
    6.     <action android:name="android.intent.action.MAIN" />
    7.     <action android:name="com.fkarim.helicopter.THEMES" />
    8.     <category android:name="android.intent.category.DEFAULT" />
    9.    </intent-filter>
    10.    <intent-filter>
    11.     <action android:name="com.fkarim.helicopter.ACTION_PICK_ICON" />
    12.     <category android:name="android.intent.category.DEFAULT" />
    13.    </intent-filter>
    14. </activity>
    15.  
    16. </application>
    17.  
    [​IMG]


    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.
     


    nyydynasty likes this.

    1. Download the Forums for Android™ app!


      Download

       
  2. nyydynasty

    nyydynasty Android Expert

    what if i wanted to make the bottom wall different from the top wall (lets say buildings for the bottom and clouds for the top)? or does it have to be the same image for both?
     
  3. HGDev

    HGDev Newbie
    Thread Starter

    At the moment they are the same, but I will change that and post an update here :D
     
  4. HGDev

    HGDev Newbie
    Thread Starter

    I've added the feature into the game now. If you add an extra image called "roof.png" it will use that as the roof and use "cavewalls.png" as the floor. If you don't include roof it will automatically use cavewalls for both the roof and the floor.
     
Loading...
Similar Threads - TUTORIAL Theme Helicopter
  1. gfr92y
    Replies:
    2
    Views:
    561
  2. samaspotion
    Replies:
    4
    Views:
    978
  3. Mike03946
    Replies:
    8
    Views:
    1,169
  4. cele
    Replies:
    1
    Views:
    620
  5. Papamalo
    Replies:
    6
    Views:
    727
  6. AngryCAT60
    Replies:
    2
    Views:
    561
  7. nhtfh
    Replies:
    4
    Views:
    1,438
  8. willy macharia
    Replies:
    2
    Views:
    2,781
  9. willy macharia
    Replies:
    0
    Views:
    2,055
  10. L_C
    Replies:
    2
    Views:
    2,237

Share This Page

Loading...