Zeus Monolitics
Zeus Monolitics

Reputation: 852

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

Upvotes: 3

Views: 5628

Answers (2)

Zeus Monolitics
Zeus Monolitics

Reputation: 852

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

Upvotes: 3

Anton Cherkashyn
Anton Cherkashyn

Reputation: 5859

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.

Upvotes: 2

Related Questions