android-两个页脚之间有空白
我已经创建了两个独立的页脚,尽管只有一个页脚仍然会出现问题。在页脚的顶部和底部有一个空白。图像本身是完美的,没有空白。它们应该堆叠在一起,绝对没有间隔 以下是一个屏幕截图: 我该怎么做才能使它们之间没有白色间隔 多谢各位 以下是我的xml:android-两个页脚之间有空白,android,header,footer,spacing,Android,Header,Footer,Spacing,我已经创建了两个独立的页脚,尽管只有一个页脚仍然会出现问题。在页脚的顶部和底部有一个空白。图像本身是完美的,没有空白。它们应该堆叠在一起,绝对没有间隔 以下是一个屏幕截图: 我该怎么做才能使它们之间没有白色间隔 多谢各位 以下是我的xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" and
<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=".MapFragment" >
<!-- Footer aligned to bottom -->
<RelativeLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:gravity="center"
>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView_footer_booktestdrive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bookatestdrivefooter" />
<ImageView
android:id="@+id/imageView_footer_website"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/footer" />
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/footer"
android:gravity="center" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/map1" />
</RelativeLayout>
我已编辑了您的布局:
删除线性布局并将一个图像底部对齐
告诉我们它是否起作用。嗨,谢谢,但它不起作用。请看截图,你能发布图片吗?我会试着直接把它放在布局上。我也会看看是否可能是图像宽度问题。谢谢。非常感谢你抽出时间。我已经把图片放在和上面链接相同的dropbox文件夹中。这里又是一个链接:Add-android:scaleType=fitXY对我来说真的很有用。我添加了android:scaleType=fitXY,它填满了空间,但为了做到这一点,垂直拉伸了两幅图像。
<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=".MapFragment" >
<!-- Footer aligned to bottom -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:id="@+id/footer"
android:orientation="vertical">
<ImageView
android:id="@+id/imageView_footer_booktestdrive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@drawable/bookatestdrivefooter"
/>
<ImageView
android:id="@+id/imageView_footer_website"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@drawable/footer"
/>
</LinearLayout>
<RelativeLayout
android:id="@+id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/footer"
android:gravity="center" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/map1" />
</RelativeLayout>
</RelativeLayout>