Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Splash Image size

I am using theme instead of layout to show splash screen,but I am confused what resolution images to set for different screen densities,because <item> tag's width and height attributes available API>22.

Background drawable

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@color/colorAccent" />
    <item >
        <bitmap
            android:gravity="center"
            android:src="@drawable/splash_logo" />
    </item>

</layer-list>

Style

  <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
        <item name="android:windowBackground">@drawable/splash_background</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorPrimary">@color/colorPrimary</item>
    </style>
like image 979
Katy Colins Avatar asked Dec 16 '17 10:12

Katy Colins


1 Answers

Splash Image size for different resolution devices for portrait

MDPI = 320x480px 

LDPI = 240x360px

HDPI = 480x720px

XHDPI = 640x960px

XXHDPI = 960x1440px

XXXHDPI = 1280x1920px

From https://romannurik.github.io/AndroidAssetStudio/index.html you can make a 9-patch image for all the resolutions - XHDPI,HDPI,MDPI,LDPI

like image 197
Amit Vaghela Avatar answered Sep 20 '22 20:09

Amit Vaghela