How to do "Hello, Android"?

Ok, this time we are going to learn how to do a tipical "Hello, World!" and emulate it in a virtual Android OS.
The first step its this, when you have installed the SDK and the eclipse plugin we can to start.
Once you have the SDK installed you must link the SDK folder with the Eclipse plugin.
For this, do it:
Press Window>Preference... and then:



(Click for see picture bigger)
Then, create a new Android project and create a new class with any name. The class contains generated code, so i'm going to highlight the new code.
So, this is the code:


package com.example.android.apis;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

public class ApiDemos extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView(this);
        tv.setText("Hello dotNet, from Android");
        setContentView(tv);
      
    }
}


Then you must run it like a "Android aplication" and you'll get something like this:


(Click for see picture bigger)


Ok, this is all for now, if you can any question you can post a comment here, or you can write me at jessanmen1@gmail.com

Cheers!

Read Users' Comments (4)

How to start?

Ok, let's go to start:

First: Download the Android SDK.
Click here to download the Android SDK.
Second: Install the Eclipse plugin.
Click here to install the Eclipse plugin.
A quick way to install the Eclipse plugin it's this:




If you have done this steps, you can start to develop in Android :)
See it!, It's fantastic!


Read Users' Comments (2)

First post in my new blog.

Hello, this is my first post, now i'm going to begin a new stage of my life, i have already finished my exams, and now i want to develop some applications for andriod.

I'm a newbie in programation languages, so i want to improve my skills and learn a lot of about differents technologies based on Android OS and JAVA and i want that all newbies like me can learn by an easy way.
So im going to introduce me.
My name is Jesús, i'm 19 years old and i'm studying computer science at University of Seville, Spain. So, why i'm writing this blog in English? Because my level of english is basic, and i want to improve it, because speaking english will be very important in my professional future.

So, this it all for now, i hope to write soon,

Cheers.

Read Users' Comments (3)