首页 > 代码库 > Android Hello world demo

Android Hello world demo

package com.example.testapk;import android.app.Activity;import android.os.Bundle;import android.widget.TextView;public class MainActivity extends Activity {   /** 活动第一次被创建后调用 */     @Override        public void onCreate(Bundle savedInstanceState) {      super.onCreate(savedInstanceState);      TextView tv = new TextView(this);      tv.setText("Hello, Android");      setContentView(tv);      }     }

  

Android Hello world demo