Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graphic dimensions for hdpi/ldpi/mdpi

Tags:

I have a button graphic with dimensions 300*90.How must be the dimensions for hdpi/mdpi/ldpi?Thanks

like image 943
menu_on_top Avatar asked Nov 22 '11 19:11

menu_on_top


2 Answers

Google suggests using

3 : 4 : 6 : 8 : 12 : 16 scaling ratios for

ldpi : mdpi : hdpi : xhdpi : xxhdpi : xxxhdpi accordingly. Example:

  • 36x36 for low-density
  • 48x48 for medium-density
  • 72x72 for high-density
  • 96x96 for extra high-density
  • 144x144 for extra-extra-high-density
  • 192x192 for extra-extra-extra-high-density

In your example, if mentioned button sizes are for hdpi, correct dimensions should be:

  • 150x45 ldpi
  • 200x60 mdpi
  • 300x90 hdpi
  • 400x120 xhdpi
  • 600x180 xxhdpi
  • 800x240 xxxhdpi
like image 177
Andrejs Cainikovs Avatar answered Sep 19 '22 16:09

Andrejs Cainikovs


It depends on what size device screen you designed that graphic against. If you want it to display as 300x90 on an 320x480 (HVGA) canvas, then your pixel dimensions are correct for MDPI devices, and you would need the following images:

  • LDPI: 225x68px
  • MDPI: 300x90px
  • HDPI: 450x135px

LDPI is 75% of MDPI scaling, and HDPI is 150% of MDPI scaling. If you designed those graphic dimensions on a 480x800 (WVGA) canvas, for example, then your dimensions are already correct for HDPI, and you need to scale the other two down from there:

  • LDPI: 150x45px
  • MDPI: 200x60px
  • HDPI: 300x90px

Hope that Helps!

like image 40
devunwired Avatar answered Sep 19 '22 16:09

devunwired