Android Warm-Up [Number Zero]

Hi.. Welcome again. Now that you have already installed all required SDK and Editor on your desktop, it is time to start the first (not really) program in Android platform. I will explain you why I called it warm-up instead of our first Android application [app].
It is because in this post, what we will introduce to you in Java code. Yes. It can also used for running on Android platform, without using XML-based layout. That's right! XML-based layout is the more common approach in Android developers. You will see them in later tutorials. Let's go down the real business, shall we?
First of all, we need to create a new project in Eclipse Editor for this tutorial. To create a new project in Eclipse, select File > New > Project. This will trigger the file wizard for new project.
Next, select Android project that will lead to the project settings. Fill in the necessary information to create a new Android project. After you have completed, click on Finish. You will see a new project has been created in your eclipse editor. Open showtime.java in your editor and paste the codes below.
package edu.mobilestudent.firstAndroid; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import java.util.Date; /*Using Java to create a button. On Click Event will trigger date.*/ public class ShowTime extends Activity implements View.OnClickListener{    Button btn;    @Override    public void onCreate(Bundle icicle){       super.onCreate(icicle);       btn = new Button(this);       btn.setOnClickListener(this);       updateTime();       setContentView(btn);    }    public void onClick(View view){       updateTime();    }    private void updateTime(){       btn.setText(new Date().toString());    } }
Next, Run your application from Run > Run. Choose Android Application when Run As window appears. Please wait for a minute while it is installing to your emulator device. Once installation is done, your emulator screen will change to http://www.blogger.com/img/blank.gifthis.
Well done. Your first experience with Android has been completed! Click on the screen and you will notice that the time will be updated. To download the package, click on FirstAndroid.rar