Building your very first "Hello Android" - Application
What is this: This tutorial shows how to create the simplest application possible at all.
What you learn: Create an Android-Project in Eclipse, alter some code and create a Run-Configuration.
Difficulty: 0.5 of 5

What it will look like:

Follow these steps:
1. At first, we have to create a new Project. Right-Click on some free space in your Package-Explorer.

[hr]
2. Select "Android Project"

[hr]
3. Fill out the form with the Structures you like...

[hr]
4. This all is the code for your first Android-Application (don't panic, mostly all of them are resource-files)

[hr]
5. Navigate to the "Hello_Android.java" and replace the text with the following:
You find the copy-paste-able text on the end of this Post...


[hr]
6. Open the Run--DropDown in the upper menu and Click "Open Run Dialog..."

[hr]
7. Click on browse and select your project (there should be just this one). Done that, click Apply and then Run.

[hr]
8. The Emulator is booting...

[hr]
9. The "Home"-App is loading...

[hr]
10. Congratulations, this is your very first Hello-Android-Application!

[hr]
The full source
Using java Syntax Highlighting
- package org.anddev.android.Hello_Android;
- import android.app.Activity;
- import android.os.Bundle;
- import android.widget.TextView;
- public class Hello_Android extends Activity {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle icicle) {
- super.onCreate(icicle);
- // We want to view some very simple text, so we need a TextView
- TextView tv = new TextView(this);
- // Put some text to the newly created TextVIew
- tv.setText("Hello Android - by: anddev.org n" +
- "This is soooo simple =D ");
- // Tell our App to display the textView
- this.setContentView(tv);
- }
- }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
Regards,
plusminus




I just begin to learn 


