【发布时间】:2017-10-28 11:48:34
【问题描述】:
我有一张尺寸为 519 像素 X 420 像素的图片,我想将它放在我的 Android 屏幕顶部。现在我的图像和我想要删除的标题之间有一些空白区域。
XML 代码:
<ImageView
android:src="@drawable/sitemakers_laptops"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
请查看上面的屏幕截图并帮助我更新我的 XML,以使蓝色标题和图像之间的空白空间完全消失。
提前致谢!
按要求完成 XML 代码:
<FrameLayout 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="in.sitemakers.sitemakers.AboutFragment">
<ImageView
android:src="@drawable/sitemakers_laptops"
android:layout_width="match_parent"
android:scaleType="fitXY"
android:layout_height="wrap_content" />
</FrameLayout>
【问题讨论】:
-
你能分享你完整的xml文件吗
-
是的,现在添加了有问题的完整 xml 代码。请检查。
标签: android android-layout imageview android-imageview