在android中怎么扩展view?
问题描述:
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)
答
只能include,不能extend