Android 尝试拉伸图像视图,使其占据整个屏幕
我已经让图像填满了大部分屏幕,但由于某些原因,它没有覆盖底部1/2英寸的空白。我已经玩了填充底部,这并没有帮助Android 尝试拉伸图像视图,使其占据整个屏幕,android,imageview,Android,Imageview,我已经让图像填满了大部分屏幕,但由于某些原因,它没有覆盖底部1/2英寸的空白。我已经玩了填充底部,这并没有帮助 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<ImageView
android:id="@+id/welcome"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp"
android:adjustViewBounds="true"
android:paddingLeft="-130dp"
android:paddingRight="-330dp"
android:scaleType="fitXY"
android:scrollX="150dp"
android:scrollY="50dp"
android:src="@drawable/jobs" />
使用“安卓:背景”而不是“安卓:src”
使用“安卓:背景”而不是“安卓:src”
使用“安卓:背景”而不是“安卓:src”
使用“安卓:背景”而不是“安卓:src”
与@Sishin的回复一起,您是否也可以发布父级的布局?您正在显示的图像是否在底部有空白?您可能正在将此图像嵌套在具有一些填充/边缘的布局中删除“调整视图边界”参数,如果不起作用,移除填充物以及@Sishin的回复,你也可以发布父对象的布局吗?你正在显示的图像底部是否有空白?你可能正在将此图像嵌套在具有一些填充物/边框的布局中。移除“调整视图边界”参数,如果不起作用,移除填充物以及@Sishin的回复,你也可以发布父对象的布局吗?你正在显示的图像底部是否有空白?你可能正在将此图像嵌套在具有一些填充物/边框的布局中。移除“调整视图边界”参数,如果不起作用,移除填充物以及@Sishin的回复,你也可以发布父对象的布局吗?你正在显示的图像底部是否有空白?你可能正在将此图像嵌套在具有一些填充物/边框的布局中。移除“调整视图边界”参数,如果不起作用,也要去掉衬垫
<LinearLayout 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"
android:background="@color/Peru"
android:gravity="center"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/traffic2" />
</LinearLayout>