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
Compatability
Ready to run
Using the Eclipse ADT

Banner

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.

figure9

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.

figure10

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.

figure11

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.

 

Banner


Getting Started with Firefox OS - The UX Building Blocks
07/07/2013 | Ian Elliot

The great thing about Firefox OS is that you can build apps without knowing anything much about it. All you need is some HTML, CSS and JavaScript. While this is true, it is also worth finding out how  [ ... ]



Getting Started With Firefox OS And Geeksphone Keon
13/05/2013 | Ian Elliot

Firefox OS looks promising and now we have the first standard hardware that runs it from Geeksphone. Creating a new app for the Keon is easy, getting it run is also easy, once you know how. In this fi [ ... ]


Other Articles

<ASIN:1449389694>

<ASIN:1430226471>

<ASIN:0981678017>

<ASIN:0672330768>

<ASIN:1430232765>

<ASIN:047077018X>



Last Updated ( Sunday, 19 September 2010 )
 
 

   
RSS feed of all content
I Programmer - full contents
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.