我要像下面的圖片Android的佈局修復
,但現在我越來越喜歡這個
此佈局在主XML文件中使用我的代碼的機器人頂部的菜單部分。
<RelativeLayout 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"
tools:context=".MainActivity" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:background="@drawable/back_gradient"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/menu"
android:background="@drawable/back_gradient" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="fill_vertical"
android:background="@drawable/back_gradient"
android:text="Welcome"
android:textAlignment="center"
android:textColor="#ffffff"
android:textSize="19sp"
android:gravity="center_vertical" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:src="@drawable/search" />
</LinearLayout>
</RelativeLayout>
有誰能告訴我我該如何實現它?
在此先感謝