Android XML 레이아웃 파일에서 두 개의보기 사이의 관계를 지정하고 싶습니다.Android XML : XML 레이아웃 파일에서 리소스 ID를 View 태그로 설정하십시오.
<View
android:id="@+id/pathview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
...
<CheckBox
android:id="@+id/viewPath"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:checked="true"
android:paddingRight="7dp"
android:shadowColor="#000000"
android:shadowDx="0.5"
android:shadowDy="0.5"
android:shadowRadius="0.5"
android:tag="@id/pathview"
android:text="Paths" />
그러나, XML 파서는 문자열로 태그를 치료하고 ("false"를 System.out.println((String) [viewPath].getTag());
인쇄) 정수로 해석하지 : 여기에 내가하고 싶은 것입니다. View의 태그에 리소스 ID를 할당 할 수있는 방법이 있습니까?
http://stackoverflow.com/questions/5100381/how-to-set-an-array-as-tag-to-any-view-through-layout-xml-in-android –