2

我正在尝试封装我所做的某些布局,以帮助我干掉我的 android xml ui 文件。

我有以下代码:

        <LinearLayout
            android:id="@+id/LinearLayout02"
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:orientation="horizontal">

            <TextView
                style="@style/text_view_small"
                android:id="@+id/time"></TextView>
            <TextView
                style="@style/text_view_small"
                android:id="@+id/number_of_worlds">
            </TextView>
        </LinearLayout>

我想简单地将其转换为以下

<DoubleTextView></DoubleTextView>

完成后,我希望能够在其他 xml 文件中使用“widgit”。是否有任何特定的资源或示例可以帮助我弄清楚如何做到这一点?

4

0 回答 0