Question

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>
Was it helpful?

Solution

Set android:scaleType value to fitXY instead of fitCenter.

android:scaleType = "fitXY"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top