Introduction to Android 2 application development
Written by Sing Li   
Wednesday, 25 August 2010
Article Index
Introduction to Android 2 application development
iProgrammer example
A practical Activity
Ready to run
Using the Eclipse ADT


Creating New Android Apps on Eclipse ADT

To create a new Android App on Eclipse using the ADT, select menu File->New ->Other... . The New wizard pops up, as shown in Figure 9. Select Android->Android Project.


Figure 9

The New Android Application wizard will be shown next.

Fill in the details of your application, including the target emulator device, the name of the initial Activity, and the minimum SDK version. See Figure 10 for an example.


Figure 10

The initial Activity, the AndroidManifest.xml, and the layout resource XML files will all be generated for you. You just need to modify and adapt them for your application.

Figure 11 shows the hierarchy of files for the i-Programmer sample project.


Figure 11

Android Apps Creation In a Nutshell

To summarize the creation of a simple Android App:

you create the user interface by editing one or more XML layout files, creating the tree of "Views" that are manipulated by your application.

Your initial Activity, a hook written in Java and specified in the AndroidManifest.xml configuration file, loads the root of the tree via the setContentView() call.

Components within your view can be located using the findViewById() call and be customized and controlled within your application logic.

Writing Great Android Apps - how?

There is no other way around this. Before you can design great Android Apps, you MUST own and use an Android phone.

Get one, carry it with you all the time and sleep with it at night. Be sure to pay for a 3G/4G data plan or use WiFi to download as many apps as possible - use them as often as possible.

Before long, you will be breath and feel the Zen, and be "one with the Android".

Once you have reached this enlightened state, the addictive aspects of the apps and operating system will be obvious to you - the warts, the gotchas, and the "I shall never ever do's" will also be obvious.

The plain fact is that mobile platforms such as Android is about as personal as you can get.

Calling the good old desktop box a Personal Computer (PC) is now a misnomer; today, it is the smart phone that is the true Personal Computer.

Once you have compiled your list of likes, dislikes, and never-do's; you'll be ready to design better Android Apps with gusto. With a little help from this article, nothing can stand in your way to challenge the mediocre and make Android a better place for all.


If you would like to be informed about new articles on I Programmer you can either follow us on Twitter, on Facebook or you can subscribe to our weekly newsletter.









Last Updated ( Sunday, 19 September 2010 )