안드로이드 개발 질문/답변
(글 수 45,052)
안녕하세요.
레이아웃 작업을 하다가 평소에 못보던게 보여서 질문드립니다.
찾아봐도 관련 글이 없네요.
아마 ADT 가 버전업이 되면서 생긴거 같은데요.
프로젝트 생성 시 자동으로 생성되는 액티비티의 레이아웃 xml 파일을 보니까.
아래 코드처럼 TextView 에 "tools:context" 가 생겼네요. 제가 모르고 있었나요?
이거 혹시 몬지 아십니까?
<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" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="@string/hello_world" tools:context=".MainActivity" /> </RelativeLayout>
2012.08.14 17:35:34
우리의 친구 스택 오버 플로우에 그에 관한 내용이 잉글리쉬로 나와 있네요..
참조하세요 ^^
http://stackoverflow.com/questions/11078487/android-whats-toolscontext-in-layout-files
레이아웃을 렌더링하는데 사용하는 Activity로
이것에 대해서는 아래 경로에 좀 더 자세히 설명되어 있습니다.
http://tools.android.com/recent/newconfigchooser