ID값을 지정할 때는 '@+id'표기 방식을 사용하고 이 표기의 의미는 ID를 리소스 정보에 추가한다는 것이지만 실제로는 ID값은 항상 '@+id'로 표기하고 사용
코드샘플
<Button
android:id="@+id/startBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/welcomeText"
android:text="@string/click_here" />
'프로그래밍 > android' 카테고리의 다른 글
Toast를 사용해 간단하게 메시지를 보여주시 (0) | 2014.11.23 |
---|---|
자바 코드 상에서 이벤트 처리를 하는 과정 (0) | 2014.11.23 |
안드로이드 스튜디오 유용한 단축키 (0) | 2014.11.23 |