Set android:scaleType
value to fitXY
instead of fitCenter
.
android:scaleType = "fitXY"
题
This is my XML file to set my height same as the screen resolution. However, there is the black space left on my screen when I run this application. Can anyone help me on this?
<?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="fill_parent"
android:background="#000000"
android:orientation="vertical" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:src="@drawable/info"
android:scaleType = "fitCenter"
/>
</RelativeLayout>
解决方案
Set android:scaleType
value to fitXY
instead of fitCenter
.
android:scaleType = "fitXY"