想实现下图所示的效果:
可是我运行后效果是这样的:
我的代码:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="@+id/imageone"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/wb_search_icon"
/>
<LinearLayout
android:id="@+id/line11"
android:layout_toRightOf="@+id/imageone"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="50dp"
android:background="#aad91818"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="床"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="4000"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/line12"
android:layout_below="@+id/line11"
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_toRightOf="@+id/imageone"
android:layout_height="50dp"
android:background="#aa1885d9"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="确定"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="取消"
/>
</LinearLayout>
</RelativeLayout>