我要像下面的图片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>
有谁能告诉我我该如何实现它?
在此先感谢