ITEEDU

HelloWorld源代码

ActivityMain.java

package com.iteedu.helloworld;

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

public class ActivityMain extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);       
        setContentView(R.layout.main);
        TextView tv=new TextView(this);
        tv.setText("www.iteedu.com");
        setContentView(tv);
    }
}