我在相对布局中对齐 2 个图像视图时遇到问题:
这 2 个图像需要靠近才能在没有空间的情况下吃其他图像。像这样:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background_portrait"
android:orientation="vertical" >
<!-- header -->
<ImageView
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/desc"
android:src="@drawable/header" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
<ImageView
android:id="@+id/dia1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/desc"
android:src="@drawable/dia1" />
<ImageView
android:id="@+id/dia2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/dia1"
android:contentDescription="@string/desc"
android:src="@drawable/dia2" />
</RelativeLayout>
我究竟做错了什么?