mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
  1. Main page
  2. dev
  3. Main content

android中xml文件嵌套

2011-07-02 105hotness 0likes 0comments

方法一
<RelativeLayout
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          <include android:id="@+id/includedContainer1" layout="@layout/layoutFile" />
</RelativeLayout>


方法二
使用merge
some_activity.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"    android:layout_width="fill_parent" android:layout_height="fill_parent"    android:orientation="vertical">    // some views    <include layout="@layout/view_part"/>   // probably more views</LinearLayout>
view_part.xml:


<merge xmlns:android="http://schemas.android.com/apk/res/android">    // the views to be merged</merge>

Tag: Nothing
Last updated:2011-07-02

mikebai

This person is a lazy dog and has left nothing

Like
< Last article
Next article >

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang