<?xml version="1.0" encoding="utf-8"?> < merge xmlns:android="http://schemas.android.com/apk/res/android" > <RelativeLayout <?xml version="1.0" encoding="utf-8"?> < merge xmlns:android="http://schemas.android.com/apk/res/android" > <RelativeLayout android:id="@+id/RelativeLayout1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="#40404A" android:baselineAligned="true" android:gravity="center_vertical" android:paddingBottom="2dip" android:paddingLeft="8dip" android:paddingRight="8dip" android:paddingTop="2dip" > <ImageView android:id="@+id/back_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_centerVertical="true" android:src="@drawable/back_button_image" /> <TextView android:id="@+id/screen_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:text="Home Screen" android:textAppearance="?android:attr/textAppearanceMedium" android:textColor="#ffffff" /> <ImageView android:id="@+id/team_logo" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:src="@drawable/logo" /> </RelativeLayout> < /merge>
<merge />
tag is used for the purpose of optimizing Android layouts by reducing the number of levels in view trees.<?xml version="1.0" encoding="utf-8"?> < LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff" android:orientation="vertical" > <include layout="@layout/header" /> <ListView android:id="@+id/games_list" android:layout_width="fill_parent" android:layout_height="wrap_content" android:choiceMode="singleChoice" > </ListView> < /LinearLayout>