a.xml이라는 파일에 ListView가 있습니다.다른 XML 파일에서 뷰 참조하기
<ListView
android:id="@+id/mylistview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:scrollbars="none"
android:layout_above="XYZ"
/>
a.xml에는 b.xml이라는 다른 파일도 포함되어 있습니다.
<include android:id="@+id/bottombar" layout="@layout/b" />
ListView의 설정 중 하나에 대해 b.xml에있는 id (XYZ)를 참조하고 싶습니다.
내가 할 수있는 방법이 있습니까?
나는 다음 시도했다 :
@ 아이디/bottombar_background는 @ 레이아웃/B에 존재하지만 이클립스 나 "아니오 자원"오류가 발생합니다<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include android:id="@+id/bottombar" layout="@layout/b" />
<ListView
android:id="@+id/mylistview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:scrollbars="none"
android:layout_above="@id/bottombar_background"
/>
</RelativeLayout>
.
"참조"란 무엇을 의미합니까? 적절한 구문은 사용법에 따라 다릅니다. – James
해결책을 찾았습니까? – ffleandro