废话不多说直接上代码:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/title_background"
android:gravity="center"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/back"
android:layout_width="100dp"
android:layout_height="fill_parent"
android:background="#00000000"
android:layout_weight="1"
android:src="@drawable/btn_back" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/allfeed_name"
android:textColor="#ffffff"
android:gravity="center"
android:layout_weight="2"
android:textSize="18dp">
</TextView>
<ImageButton
android:id="@+id/exit"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_weight="0"
android:src="@drawable/button_exit" />
</LinearLayout>