简体   繁体   中英

How to create different layout for Nexus 4 and similar devices? (Galaxy S4)

The question is how create a specific layout for Nexus 4 and similar devices?

4.7" diagonal 1280 x 768 pixel resolution (320 ppi) WXGA IPS

For Nexus 4 should load the same layout that Galaxy S3

Galaxy S3 Screen Size: 4.8 inch Screen Resolution: 1,280 x 720 pixels

And the configuration should be:

  1. For same layout landscape and portrait layout-sw360dp
  2. Only for landscape layout-sw360dp-land
  3. Only for portrait layout-sw360dp-port

Other similar devices:

  • LG Optimus 4X HD
  • HTC One X+

For Galaxy S4 should also compatible and load this layout

The response was in this entry: Android S3 layout vs Galaxy Nexus layout

You can create layout directories for specific combinations. For 7" 1280 x 768 at 320 ppi it will look something like this:

layout-sw600p-xdpi-large

As @Tomer Mor mentioned, you can find a full list of available parameters here

Also, if you want to be even more specific about device parameters, take a look at this question - you can assign different layouts from code, depending on the environment.

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