Rohit
Rohit

Reputation: 2568

Android- How to differentiate Galaxy S-3 and Galaxy S-4 layouts?

I am having problem differentiating layout folders for samsung galaxy s4 and samsung galaxy s3. I have tried layout-sw360dp, layout-sw360dp-xxhdpi, layout-sw360dp-xhdpi etc. All the time galaxy s4 and galaxy s3 both picks from layout-sw360dp-xhdpi.

So what should be the correct layout folder for both of these devices ?

enter image description here

Upvotes: 6

Views: 795

Answers (2)

Mark Buikema
Mark Buikema

Reputation: 2540

The Galaxy S4 has a Full HD screen, you could create a separate layout for this resolution by using layout-xxhdpi for the S4 and layout-xhdpi for the S3.

Upvotes: 1

canova
canova

Reputation: 3975

I am using some specific resolution values in my projects in order to differentiate these from other layouts and screens.

You can create layouts with exact minimum height and width values that can be seen from gsmarena.

Samsung S3: http://www.gsmarena.com/samsung_i9300_galaxy_s_iii-4238.php

S3 layout folder name: layout-w720-h1280

Samsung S4: http://www.gsmarena.com/samsung_i9500_galaxy_s4-5125.php

S4 layout folder name: layout-w1080-h1920

So they will be using corresponding layouts by creating layout folders like these.

Upvotes: 2

Related Questions