안드로이드 개발 질문/답변
(글 수 45,052)
C:\eclipse\workspace\HelloAndroid\res\layout
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:textColor="#FF00FF" android:gravity="center" android:text="Hello World, HelloAndroid"/> <EditText id="@+id/entry" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@android:drawable/editbox_background" /> </LinearLayout>새로운 안드로이드ID 이름 의미가 뭐냐는 말인가요?
(한글파일에 캡쳐한 사진)
이게 무슨말인지 이해가 안되네요;
main.xml 14번째 줄같은데 어떻게 하라는건지좀 알려주세요;
id
=
"@+id/entry" 부분 물어보시는 건가요?
이 부분은 xml 내부에서 정의 하신 컴포넌트들을 java코드에서 불러쓰기위해 정의한 부분입니다.
불러다 쓰려고 이름을 달아둔거 라고 생각하시면 편하실듯합니다.
지금 만드신 EditText 부분을 불러쓰시기 위해서는
EditText ex = (EditText)findViewById(R.id.entry); 라던지
View ex = (View)findViewById(R.id.entry); 로 받아서 사용하시면 되겠지요.
원하시는 답변인지 모르겠습니다.