ページ

Saturday, February 27, 2010

"Hello World" application worked on Android

I'm getting a bit interested in developing something for mobile application.
so, today, I investigated something about how to create an application worked on Android.

Android SDK
http://developer.android.com/sdk/index.html

Eclipse
http://www.eclipse.org/

Eclipse:



  *Eclipse IDE for Java Developers

Run the project as Android Application:








This kind of programming seems easy for beginners.

HelloWorld.java
package demo.android.helloworld;

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

public class HelloWorld extends Activity {
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
TextView txt = new TextView(this);
txt.setText("Hello World!");
setContentView(txt);
}
}

No comments:

Post a Comment