activity main.xml (레이아웃)

Jmnote (토론 | 기여)님의 2012년 12월 11일 (화) 16:00 판 (→‎소스 코드)

activity_main.xml

1 소스 코드

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@string/hello_world" />

</RelativeLayout>
→ 텍스트편집기에는 "@string/hello_world"라고 되어 있는데, 그래픽 모드에는 "Hello world!"라고 보인다...
strings.xml 파일을 보면 "hello_world"라는 이름으로 "Hello world!"라는 값이 등록되어 있다.

2 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}