Android splash screen image that occupies full screen width and height - android

I am trying to create a splash screen image that scales well for each screen size.
I am trying to determine if I am misunderstanding how pixel densities function.
According to the documentation,
To create alternative bitmap drawables for different densities, you
should follow the 3:4:6:8:12:16 scaling ratio between the six primary
densities. For example, if you have a bitmap drawable that's 48x48
pixels for medium-density screens, all the different sizes should be:
36x36 (0.75x) for low-density (ldpi)
48x48 (1.0x baseline) for medium-density (mdpi)
72x72 (1.5x) for high-density (hdpi)
96x96 (2.0x) for extra-high-density (xhdpi)
144x144 (3.0x) for extra-extra-high-density (xxhdpi)
192x192 (4.0x) for extra-extra-extra-high-density (xxxhdpi)
Now, I take this to mean that a 192x192 image will occupy the same amount of screen space on an xxxhdpi display as a 48x48 pixel image on a standard display.
That means that if I want a full screen image for a Google Pixel 2 display which is 1080px by 1920px and has an xxhdpi density of 2.6 then I need an image that is 1080 * 2.6 = 2808px by 1920 * 2.6 = 4992px.
Is this logic correct?

Related

In which drawable resource file should I place an image based in the pixel size?

I have 3 images with the following sizes in pixels (I got them from Get Info)
300x200
150x100
600x400
Question: How do I know in which resources directory (hdpi|mdpi|xhdpi etc) I should put them?
There are 8 folders available, and each one varies depending on pixel density:
1. lpdi - Resources for low-density (ldpi) screens (~120dpi).
2. mdpi - Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)
3. hdpi - Resources for high-density (hdpi) screens (~240dpi).
4. xhdpi - Resources for extra-high-density (xhdpi) screens (~320dpi).
5. xxhdpi - Resources for extra-extra-high-density (xxhdpi) screens (~480dpi).
6. xxxhdpi - Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi).
7. nohdpi - Resources for all densities. These are density-independent resources. The system does not scale resources tagged with this qualifier, regardless of the current screen's density.
8. tvdpi - Resources for screens somewhere between mdpi and hdpi; approximately 213dpi. This is not considered a "primary" density group. It is mostly intended for televisions and most apps shouldn't need it—providing mdpi and hdpi resources is sufficient for most apps and the system will scale them as appropriate. If you find it necessary to provide tvdpi resources, you should size them at a factor of 1.33*mdpi. For example, a 100px x 100px image for mdpi screens should be 133px x 133px for tvdpi.
To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six primary densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
36x36 (0.75x) for low-density (ldpi)
48x48 (1.0x baseline) for medium-density (mdpi)
72x72 (1.5x) for high-density (hdpi)
96x96 (2.0x) for extra-high-density (xhdpi)
144x144 (3.0x) for extra-extra-high-density (xxhdpi)
192x192 (4.0x) for extra-extra-extra-high-density (xxxhdpi)
You can have even more information from Android official documentation
Copy image and paste to drawable folder.
You can add image by using .xml file
<ImageView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="#drawable/image_name" />

Recomended size for seeker thumb image?

I have a 144x144 png for xxhdpi which looks much to large. I can't seem to find this information anywhere. How could I programatically change the size of the thumb to double the size of the track also?
what are the recommended resolutions for each density?
According to Support different pixel densities:
ldpi Resources for low-density (ldpi) screens (~120dpi).
mdpi Resources for medium-density (mdpi) screens (~160dpi). (This is the baseline density.)
hdpi Resources for high-density (hdpi) screens (~240dpi).
xhdpi Resources for extra-high-density (xhdpi) screens (~320dpi).
xxhdpi Resources for extra-extra-high-density (xxhdpi) screens (~480dpi).
xxxhdpi Resources for extra-extra-extra-high-density (xxxhdpi) uses (~640dpi).

Creating Android resource images sizes

So I need to create images to be part of my app that I'm making. I haven't found the answer anywhere.
What I am wondering is...
If I created an image that is to be displayed on Activity1, then what image size in PIXELS should I created the initial image at?
The initial image would then be resized to their corresponding DPI to work well on Android phones.
I may be doing this wrong in creating images so they don't lose their quality, any ideas?
If I am doing this wrong, then please can someone advise on the best practice on creating Android images in pixels and then converting to DPI later after the initial image?
Thank you! :)
EDIT: This question is different because I'm mainly talking about keeping image quality by making the image big first and then downsizing.
You have to create six generalized size image densities:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
For more detail check out this link
To generate image for Android device you can follow this as I do:
To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
36x36 (0.75x) for low-density
48x48 (1.0x baseline) for medium-density
72x72 (1.5x) for high-density
96x96 (2.0x) for extra-high-density
144x144 (3.0x) for extra-extra-high-density
192x192 (4.0x) for extra-extra-extra-high-density (launcher icon
only; see note above)
​Or,
Image resolution and DPI are tightly coupled each other. There is a 3:4:6:8 scaling ratio in drawable size by DPI.
LDPI - 0.75x
MDPI - Original size
HDPI - 1.5x
XHDPI - 2.0x
XXHDPI - 3x
XXXHDPI - 4.0x ​
For example if a 100x100 image is a baseline (MDPI),
LDPI - 75x75
HDPI - 150x150
XHDPI - 200x200
XXHDPI - 300x300
XXXHDPI - 400x400
and so on.
​​

How to know the image sizes to design for hdpi, xhdpi, nodpi, etc

I want to design custom images for my app but I'm confused how the image resolutions should differ in the different drawable folders.
Assuming I designed a 100px by 100px image for hdpi, what should be the resolution of xhdpi, xxhdpi, nodpi, etc.
To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
36x36 (0.75x) for low-density
48x48 (1.0x baseline) for medium-density
72x72 (1.5x) for high-density
96x96 (2.0x) for extra-high-density
180x180 (3.0x) for extra-extra-high-density
192x192 (4.0x) for extra-extra-extra-high-density (launcher icon only; see note above)
Hope this will help you.
Hope that can help you !
http://hpics.li/5197929
let us know

Android Export Cropping When XXHDPI Taken as Baseline 100% In Photoshop Then How to crop means size of XHDPI, HDPI, MDPI, LDPI

Android Export
XXHDPI - 100% baseLine
XHDPI - ?
HDPI - ?
MDPI - ?
LDPI - ?
Plz say anyonce of these sizes
I'm not sure, but don't you need the resolutions of the images?
If so, may I link you to Android Developer support?
You can get a lot of information here:
A set of six generalized densities:
ldpi (low) ~120dpi
mdpi (medium) ~160dpi
hdpi (high) ~240dpi
xhdpi (extra-high) ~320dpi
xxhdpi (extra-extra-high) ~480dpi
xxxhdpi (extra-extra-extra-high) ~640dpi
To create alternative bitmap drawables for different densities, you should follow the 3:4:6:8:12:16 scaling ratio between the six generalized densities. For example, if you have a bitmap drawable that's 48x48 pixels for medium-density screens, all the different sizes should be:
36x36 (0.75x) for low-density
48x48 (1.0x baseline) for medium-density
72x72 (1.5x) for high-density
96x96 (2.0x) for extra-high-density
180x180 (3.0x) for extra-extra-high-density
192x192 (4.0x) for extra-extra-extra-high-density (launcher icon
only; see note above)
Image example:
Now, lets post this, and calculate the rest!
Edit:
I made a simple calculation with Excel

Categories

Resources