<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <TextView 
        android:layout_width="320px" 
        android:layout_height="wrap_content"
        android:text="TextView"
        android:background="#0000"
        >
        <!--  16*16=256  RGB #RRGGBB -->
    </TextView>
    <Button 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="버튼">
    </Button>
    <Button 
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="버튼2">
    </Button>

</LinearLayout>



R.java 파일은 변경하지 않는다.11번째 줄에 생성이 된다..
package com.sogangori;

public final class R {
    public static final class attr {
    }
    public static final class drawable {
        public static final int dolly=0x7f020000;
        public static final int ic_launcher=0x7f020001;
    }
    public static final class layout {
        public static final int main=0x7f030000;
    }
    public static final class string {
        public static final int app_name=0x7f040001;
        public static final int hello=0x7f040000;
        public static final int myname=0x7f040002;
    }
}

package com.sogangori; 

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

public class HelloWorldActivity extends Activity {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        
        //-----------xml--------------
        
        setContentView(R.layout.main);
        
    }
}



'Android > 2012.04월 강좌' 카테고리의 다른 글

2일차 Layout  (0) 2012.04.27
2일차 기본3  (0) 2012.04.27
2일차 기본  (0) 2012.04.27
2일차 이미지 출력하기  (0) 2012.04.27
2일차 리소스의 활용  (0) 2012.04.27

+ Recent posts