image

备份一下简单的程序代码:

package com.zhai.android.textview;
import android.app.Activity;
import android.os.Bundle;

import android.widget.TextView;

public class activity01 extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView textview= (TextView)findViewById(R.id.TextView01);// get the TExtview       
        String string="TextView中显示的文字";
        textview.setText(string);
       
    }
}