About supporting multiple screen.

Search This thread

Pryato

New member
May 16, 2014
3
0
Hi,
About support for multiple screens , I have understood to be based on the dpi , screen density .
As I read there are 4 types of density in android devices, approximately:

low - 120 dpi
medium - 160 dpi
high - 240 dpi
xhigh - 320 dpi

Also, I would have to define everything that uses , in my application, ' dp ' rather than pixels , okey .

Now what?

Different screen sizes , with different densities .

Put yourself in the situation that I want to make a game and I want to start by making a background and sprite.
It would have to do 4 sprites and 4 different funds for different types of densities, ok ? But, who would actually scale ? I mean, to work in any image editor like photoshop.
That dimension should have , for example , the background ?

I'll start with the high density ( 240dpi ) .

I have three devices with different sizes but same density.
The first is of 480x800 , 320x480 second and third 768x1280 .
Well, for example , to make the background of the game , that dimension would have to have ? A be the average of the three ? 784x1280 ?
If this is true, now would have to convert the pixels in pd to have an intermediate dimension depending on the dpi and I can work with , using the formula p = dp * ( dpi/160 ), where 'p' are pixels, 'dp' density-independent pixels, and dpi are dpi

And I would have , rounding , 523dp x 854dp .
This would be my size in pixels with which would make my background in photoshop.

All this is correct ? If I make a real background with dimensions 523x854 pixels , which conventiran in ' dp ' in the android devices, will look good on all those screens whose density is high ?

Please, correct me and help me

Thanks :)

PD: Sorry for my english, I used translate google :eek:
 

mohamedrashad

Senior Member
Nov 15, 2012
1,087
618
26
ismailia
Hi,
About support for multiple screens , I have understood to be based on the dpi , screen density .
As I read there are 4 types of density in android devices, approximately:

low - 120 dpi
medium - 160 dpi
high - 240 dpi
xhigh - 320 dpi

Also, I would have to define everything that uses , in my application, ' dp ' rather than pixels , okey .

Now what?

Different screen sizes , with different densities .

Put yourself in the situation that I want to make a game and I want to start by making a background and sprite.
It would have to do 4 sprites and 4 different funds for different types of densities, ok ? But, who would actually scale ? I mean, to work in any image editor like photoshop.
That dimension should have , for example , the background ?

I'll start with the high density ( 240dpi ) .

I have three devices with different sizes but same density.
The first is of 480x800 , 320x480 second and third 768x1280 .
Well, for example , to make the background of the game , that dimension would have to have ? A be the average of the three ? 784x1280 ?
If this is true, now would have to convert the pixels in pd to have an intermediate dimension depending on the dpi and I can work with , using the formula p = dp * ( dpi/160 ), where 'p' are pixels, 'dp' density-independent pixels, and dpi are dpi

And I would have , rounding , 523dp x 854dp .
This would be my size in pixels with which would make my background in photoshop.

All this is correct ? If I make a real background with dimensions 523x854 pixels , which conventiran in ' dp ' in the android devices, will look good on all those screens whose density is high ?

Please, correct me and help me

Thanks :)

PD: Sorry for my english, I used translate google :eek:





Make 5 folders in res folder

drawable-ldpi
drawable-mdpi
drawable-hdpi
drawable-xhdpi
drawable-xxhdpi

and put every thing on them and andrioid resize them automatically.


also...for best results use "wrap_content"
in layout_width and layout_height
 
  • Like
Reactions: Pryato

arpitkh96

Senior Member
Feb 17, 2012
1,156
645
27
panipat
Hi,
About support for multiple screens , I have understood to be based on the dpi , screen density .
As I read there are 4 types of density in android devices, approximately:

low - 120 dpi
medium - 160 dpi
high - 240 dpi
xhigh - 320 dpi

Also, I would have to define everything that uses , in my application, ' dp ' rather than pixels , okey .

Now what?

Different screen sizes , with different densities .

Put yourself in the situation that I want to make a game and I want to start by making a background and sprite.
It would have to do 4 sprites and 4 different funds for different types of densities, ok ? But, who would actually scale ? I mean, to work in any image editor like photoshop.
That dimension should have , for example , the background ?

I'll start with the high density ( 240dpi ) .

I have three devices with different sizes but same density.
The first is of 480x800 , 320x480 second and third 768x1280 .
Well, for example , to make the background of the game , that dimension would have to have ? A be the average of the three ? 784x1280 ?
If this is true, now would have to convert the pixels in pd to have an intermediate dimension depending on the dpi and I can work with , using the formula p = dp * ( dpi/160 ), where 'p' are pixels, 'dp' density-independent pixels, and dpi are dpi

And I would have , rounding , 523dp x 854dp .
This would be my size in pixels with which would make my background in photoshop.

All this is correct ? If I make a real background with dimensions 523x854 pixels , which conventiran in ' dp ' in the android devices, will look good on all those screens whose density is high ?

Please, correct me and help me

Thanks :)

PD: Sorry for my english, I used translate google :eek:

Just make one image of xxhdpi dimensions and resize it using Google android asset studio

Sent from my GT-S5570 using XDA Premium 4 mobile app
 
  • Like
Reactions: Pryato

andras_k

Member
May 13, 2014
10
2
Santiago de Chile, Chile
You should also include a drawable-xxxhdpi folder. This is only required for 1080p devices with the KitKat launcher, and only the app icon is needed here, it should have a resolution of 192 x 192 pixels.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi,
    About support for multiple screens , I have understood to be based on the dpi , screen density .
    As I read there are 4 types of density in android devices, approximately:

    low - 120 dpi
    medium - 160 dpi
    high - 240 dpi
    xhigh - 320 dpi

    Also, I would have to define everything that uses , in my application, ' dp ' rather than pixels , okey .

    Now what?

    Different screen sizes , with different densities .

    Put yourself in the situation that I want to make a game and I want to start by making a background and sprite.
    It would have to do 4 sprites and 4 different funds for different types of densities, ok ? But, who would actually scale ? I mean, to work in any image editor like photoshop.
    That dimension should have , for example , the background ?

    I'll start with the high density ( 240dpi ) .

    I have three devices with different sizes but same density.
    The first is of 480x800 , 320x480 second and third 768x1280 .
    Well, for example , to make the background of the game , that dimension would have to have ? A be the average of the three ? 784x1280 ?
    If this is true, now would have to convert the pixels in pd to have an intermediate dimension depending on the dpi and I can work with , using the formula p = dp * ( dpi/160 ), where 'p' are pixels, 'dp' density-independent pixels, and dpi are dpi

    And I would have , rounding , 523dp x 854dp .
    This would be my size in pixels with which would make my background in photoshop.

    All this is correct ? If I make a real background with dimensions 523x854 pixels , which conventiran in ' dp ' in the android devices, will look good on all those screens whose density is high ?

    Please, correct me and help me

    Thanks :)

    PD: Sorry for my english, I used translate google :eek:





    Make 5 folders in res folder

    drawable-ldpi
    drawable-mdpi
    drawable-hdpi
    drawable-xhdpi
    drawable-xxhdpi

    and put every thing on them and andrioid resize them automatically.


    also...for best results use "wrap_content"
    in layout_width and layout_height
    1
    Hi,
    About support for multiple screens , I have understood to be based on the dpi , screen density .
    As I read there are 4 types of density in android devices, approximately:

    low - 120 dpi
    medium - 160 dpi
    high - 240 dpi
    xhigh - 320 dpi

    Also, I would have to define everything that uses , in my application, ' dp ' rather than pixels , okey .

    Now what?

    Different screen sizes , with different densities .

    Put yourself in the situation that I want to make a game and I want to start by making a background and sprite.
    It would have to do 4 sprites and 4 different funds for different types of densities, ok ? But, who would actually scale ? I mean, to work in any image editor like photoshop.
    That dimension should have , for example , the background ?

    I'll start with the high density ( 240dpi ) .

    I have three devices with different sizes but same density.
    The first is of 480x800 , 320x480 second and third 768x1280 .
    Well, for example , to make the background of the game , that dimension would have to have ? A be the average of the three ? 784x1280 ?
    If this is true, now would have to convert the pixels in pd to have an intermediate dimension depending on the dpi and I can work with , using the formula p = dp * ( dpi/160 ), where 'p' are pixels, 'dp' density-independent pixels, and dpi are dpi

    And I would have , rounding , 523dp x 854dp .
    This would be my size in pixels with which would make my background in photoshop.

    All this is correct ? If I make a real background with dimensions 523x854 pixels , which conventiran in ' dp ' in the android devices, will look good on all those screens whose density is high ?

    Please, correct me and help me

    Thanks :)

    PD: Sorry for my english, I used translate google :eek:

    Just make one image of xxhdpi dimensions and resize it using Google android asset studio

    Sent from my GT-S5570 using XDA Premium 4 mobile app
    1
    Just make one image of xxhdpi dimensions and resize it using Google android asset studio

    Sent from my GT-S5570 using XDA Premium 4 mobile app

    No need to resize manually. Android itself resize them

    Sent from my GT-S5360 using Tapatalk 2
    1
    No need to resize manually. Android itself resize them

    Sent from my GT-S5360 using Tapatalk 2

    Yeah but it would cause more resource consumption

    Sent from my GT-S5570 using XDA Premium 4 mobile app