"Activity main.xml (레이아웃)"의 두 판 사이의 차이

21번째 줄: 21번째 줄:
</source>
</source>
:→ 그래픽 모드에는 "Hello world!"라고 보이는데, 텍스트편집기에는 "@string/hello_world"라고 되어 있다...
:→ 그래픽 모드에는 "Hello world!"라고 보이는데, 텍스트편집기에는 "@string/hello_world"라고 되어 있다...
:→ 프로젝트 > res > values > strings.xml 파일을 보면 "Hello world!"라는 값이 "hello_world"라는 이름으로 등록되어 있다.


==같이 보기==
==같이 보기==

2012년 12월 11일 (화) 15:55 판

activiy_main.xml

1 소스 코드

  • 프로젝트 > res > layout 폴더에 있는 파일
<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>
→ 그래픽 모드에는 "Hello world!"라고 보이는데, 텍스트편집기에는 "@string/hello_world"라고 되어 있다...
→ 프로젝트 > res > values > strings.xml 파일을 보면 "Hello world!"라는 값이 "hello_world"라는 이름으로 등록되어 있다.

2 같이 보기

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