Reputation: 127
I want to set a splash for my android application and I wonder that which resolution of picture belongs to which category of drawable folder in bundleSDK (hdpi, xhdpi, xxhdpi etc) ?
Upvotes: 0
Views: 183
Reputation: 1339
As described here bitmaps for different screen dencity values have following ratios: ldpi:mdpi:hdpi:xhdpi - 3:4:6:8. I'd recommend you to use either some composite layout or layer-drawable
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<!-- background goes here -->
<shape android:shape="rectangle" >
<solid android:color="#000" />
</shape>
</item>
<item>
<!-- splash-screen image -->
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:dither="true"
android:gravity="center"
android:src="@drawable/your_bitmap"
android:tileMode="disabled" >
</bitmap>
</item>
</layer-list>
your_bitmap stands for your splash screen art that exists in different resolutions, according to screen densities.
Upvotes: 0
Reputation: 6792
Here are the details:
36x36 for low-density (LDPI - 120dpi)
48x48 for medium-density (MDPI - 160dpi)
72x72 for high-density (HDPI - 320dpi)
96x96 for extra high-density (XHDPI)
144x144 for extra extra high-density (XXHDPI)
Google's guide - http://developer.android.com/guide/practices/screens_support.html
Source - Android screen size HDPI, LDPI, MDPI
Upvotes: 2