what i have is an activity and i add an images to it, and i make it as background for the activity with the following xml :
<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"
tools:context=".SplashScreen">
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/splash5" />
</LinearLayout>
and the image size is : 550 px for width and 800 px for height
and as you can see from the image you can see a white space in top and in bottom .. why this is happening even it's fill parent for width and height?
use like this:
<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"
tools:context=".SplashScreen">
<ImageView
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/splash5"
android:scaleType="fitXY"
/>
</LinearLayout>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments