简体   繁体   中英

what resolution for creating android UI

I read about dp and pixel and calculate dpi and pixel . but i am confused. I want to know if I want to create UI for my app, is better what resolution I select for beginning? I want to use of Photoshop . on design section in Android studio, there are e few devices with their resolutions,for example ( 480 * 800 hdpi(nexus one) ) and so on . but which one is better for first create on photoshop?

I suggest using px for design

  • Mobile: 360 x 640
  • Tablet 7inch: 600 x 960
  • Tablet 9inch: 1024 x 768

References

https://i.stack.imgur.com/rrNoM.png

https://i.stack.imgur.com/ueFa0.png

https://i.stack.imgur.com/CAt1u.png

Use Density-independent pixel (dp) units when defining your application's UI, to ensure proper display of your UI on screens with different densities. The android documentation says :

A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application's UI, to ensure proper display of your UI on screens with different densities.

You can read it here

For correct icon size you should read answer this

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM