본문 바로가기

Programming/java/Android

핼로 안드로이드 소스코드 ㅇㅅㅇ/....

//패키지 선언(패키지 이름 = com.helloworld)
package com.helloworld;

// Import 문
import android.widget.TextView; //(1)
import android.app.Activity;
import android.os.Bundle;

// class 선언
public class helloandroid extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
        TextView hello = new TextView(this); // (2)
        hello.setText("Hello, Android!!!\n"+
          "안녕, 안드로이드 ㅇㅅㅇ/");
        setContentView(hello);    
    }
}

//튜토리얼과 어플 아이콘 제작방법은 나중에