android - Screen density confusion -


let me start of telling research have done.

on developer.android.com states following should done support different screen sizes:

  • res/layout/my_layout.xml // layout normal screen size ("default")

  • res/layout-large/my_layout.xml // layout large screen size

  • res/layout-xlarge/my_layout.xml // layout extra-large screen size

  • res/layout-xlarge-land/my_layout.xml // layout extra-large in landscape orientation

it states drawables should scaled this:

to create alternative bitmap drawables different densities, should follow 3:4:6:8:12:16 scaling ratio between 6 generalized densities. example, if have bitmap drawable that's 48x48 pixels medium-density screens, different sizes should be:

  • 36x36 (0.75x) low-density
  • 48x48 (1.0x baseline) medium-density
  • 72x72 (1.5x) high-density
  • 96x96 (2.0x) extra-high-density
  • 144x144 (3.0x) extra-extra-high-density
  • 192x192 (4.0x) extra-extra-extra-high-density

now here question, lets hypothetically i'm designing nexus 10, in landscape mode. device fall under res/layout-large-land/ , screen density under (2.0x) extra-high-density - xhdpi.

but don't understand nexus 10 has tablet size screen falls under xhdpi, meaning image fetched drawable resource folder displayed smaller on device. have tested on nexus 10 , on phone , image lot smaller on nexus 10, expecting be.

i have been confused time , have done lot of research. can please me clarify ones , all. thank you.

the nexus 10 sure has tablet size screen (10.1 in), falls under xhdpi(extra high density) class because of pixel per inch(ppi) 299. can identify class device fall checking it's dpi. below density different classes.

  • ldpi - 120 dpi
  • mdpi - 160 dpi
  • hdpi - 240 dpi
  • xhdpi - 320 dpi
  • xxhdpi - 480 dpi

in context, ppi of samsung galaxy tab 10 inch tablet has tablet size screen 149. hence, falls under mdpi class. refer this site, helps understand device has dpi , density class. this website recommended learn more different device screen sizes.

just added information, nexus 10 tablet xhdpi device, uses xxhdpi class it's launcher icons(arguably important part of app).


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -