예, xml 레이아웃에 병합 및 포함 태그를 사용할 수 있습니다. 이 도움이
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:background="#FFFFFFFF"
android:layout_gravity="fill">
</ListView>
<LinearLayout
android:layout_gravity="fill_horizontal"
android:orientation="horizontal"
android:padding="5dp">
<Button
android:text="Cancel"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<Button
android:text="OK"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</merge>
홉 :
<?xml version="1.0" encoding="utf-8"?><GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include android:id="@+id/my_inside_grid_layout"
layout="@layout/grid_layout_inside"/> </GridLayout>
참고 태그의 사용은 다음과 같은 포함 grid_layout_inside.xml 파일의 내용을 가져올 수 : grid_layout_view.xml에서 예를 들어, 당신은이 코드가 Ruben
빠른 답장을 보내 주셔서 감사합니다. 예를 들어, grid_layout_inside.xml을 grid_layout_view.xml에 여러 번 포함시키고 각에 대해 grid_layout_view.xml에서 취소 버튼의 다른 텍스트를 설정할 수 있습니까? –
user1628803