Android Hello World Example
This is the most easy tutorial as far as android is concerned.
When you create a new project, by default Google has included hello world code for you. But what happens behind the code is the important part.
Summary steps to develop an Android application :
- Install Android SDK
- Install ADT Eclipse plugin
- Create an Android Virtual Device (AVD)
- Create Android Project with Eclipse (Wizard)
- Code it…
- Start it in Android Virtual Device (AVD)
In android all the code is normally written in Java
GUI is created using XML
So you have to attach GUI elements to the code. How we do this is via a file called R. R is a automatically generated file where you have all the default name for the elements which you have included in the GUI.
When you run the code what happen is all the components will be linked together with the code and display the output
But How come Hello world String appear in the GUI
Hello world string is in actually String file.
String Resources
A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings:
String
XML resource that provides a single string.
String Array
XML resource that provides an array of strings.
Quantity Strings (Plurals)
XML resource that carries different strings for pluralization.
All strings are capable of applying some styling markup and formatting arguments. For information about styling and formatting strings.
Useful Links

No comments:
Post a Comment