我想在我的应用程序上运行多个活动;我希望每个活动都具有线性布局并将图像显示为标题;基本上我想每一个布局,像这样开头:避免重写具有相同布局的活动的代码
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/Grey"
>
<ImageView android:id="@+id/imageHeader" android:src="@drawable/tf_header" android:layout_height="wrap_content" android:layout_width="fill_parent"
android:background="@color/Black" android:scaleType="fitXY"></ImageView>
是否有可能不reapeat为每个布局这个代码?我可以使用主题或样式来避免它吗?谢谢您的回复。