0

我有一个 base.xml 视图:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:orientation="horizontal" >


    <TextView
        android:id="@+id/shown_path"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text=" Test" />
</LinearLayout>

我想再创建两个视图:

带有 TextView 的 view1.xml 和带有 Button 的 view2.xml(都是“扩展”base.xml)。

我怎样才能做到这一点?

4

1 回答 1

0

你不能。您只能将 xml 布局包含到另一个布局中(包含/合并

于 2013-01-07T00:59:28.777 回答