Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

splash screen margin problems?

I am using the following code to display splash screen, but it is showing a margin at the bottom. Can anyone guide me what mistake am I making here?

My image resolution is 480 x 800.

    <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/linearLayout1" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
>
<ImageView android:src="@drawable/splash"
 android:layout_width="wrap_content" android:id="@+id/imageView1" android:layout_height="wrap_content"></ImageView>
</RelativeLayout>

Manifest:

<application android:name="MyApplication" android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".SplashScreen" android:configChanges="locale" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

enter image description here

like image 392
UMAR-MOBITSOLUTIONS Avatar asked Jun 08 '11 13:06

UMAR-MOBITSOLUTIONS


People also ask

What size should a splash screen image be?

Splash Screen dimensions The splash screen icon uses the same specifications as Adaptive icons, as follows: Branded image: This should be 200×80 dp. App icon with an icon background: This should be 240×240 dp, and fit within a circle of 160 dp in diameter.

What is the purpose of the splash screen?

Techopedia Explains Splash Screen The primary purpose is just to show people what they are using and reinforce the brand image, while remaining a kind of placeholder that people look at while they wait for the operating system to start up.

Is splash screen mandatory?

No, it is not required to set a launch image.


1 Answers

try to add android:scaleType="fitXY" to your XML ( in your ImageView )

like image 106
Houcine Avatar answered Nov 09 '22 09:11

Houcine