android - Trying to define which layout should a device use -
I am trying to understand which layout uses that device.
For example, I have a different layout:
Nexus 7 "(800x1280) Layout - Sw600dp Uses
Samsung GTp3100 7" (600x1.024) Layout- Sw600dp Uses
Samsung Tab 10.1 (1280x800) Layout uses sw720dp
Sony uses Xperia S 4.3 (1280x720) layout
Can you "explain" people with your words Not using XPERIA S sw600dp or sw720dp? SW! = Small width? So XPERIA S is at least 720. It should use sw720 or sw600, right? Or am I wrong?
I have read a lot of documents, but I do not understand why this is happening.
Thank you very much. <
The smallest fourth qualifier mainly refers to the screen size and not the physical pixels. For example, the device should have a minimum screen width of 720
DP (device-independent pixel) - it is not nearly 720 physical pixels for documentation
sw720dp ...
Density-independent pixel 160 dpi is equal to a physical pixel on the screen, which is the baseline density taken by the system for a "medium" density screen.
The physical width of Sony Xperia S 4.3 is 2.5 "but I do not know how much the actual width of the screen is.
Let us debate for the calculation that the screen is full To cover the width of
dpi in this case we just use
720 / 2.5 = 288dpi . P>
dp ...
DP units are easy to convert screen pixels: px = dp * (dpi / 160)
dp calculation To get rid of the formula given above, we do this ...
dp = px / (dpi / 160)
... it gives us width in
dp (and a required minimum quarter qualification) ...
720 / (288/160) = 400dp
Comments
Post a Comment