3

Like for the earlier devices we can create 3 kinds of layouts:-

  • normal-layout
  • large-layout
  • xlarge-layout

But what if I want to develop application for Samsung Galaxy S4. Is there any new configuration launched for this particular screen or it will take layout from xlarge-layout.

Same query would be raised for drawable configuration.

I don't have S4 available at this so i need to ask here. Any answer would be appreciated.

stackoverflow
  • 2,320
  • 3
  • 17
  • 21
Suresh Sharma
  • 1,826
  • 22
  • 41

3 Answers3

5

Galaxy s4 is considered as xxhdpi, which is around 480 ppi.And the name of the folder should be layout-xxhdpi.Devices like Xperia Z, HTC One etc also uses the same resource folder.

enter image description here

Basim Sherif
  • 5,384
  • 7
  • 48
  • 90
2

The ideal layout folder for Galaxy S4 is layout-xxhdpi

Galaxy S4 -- 1080 x 1920 pixels -- 5.0" -- 441 ppi (432 dp) -- xxhdpi

But even if you have not given the particular layout, Android will take resources from the next possible layout and optimize the resources according to the device(Although it may not be correct for the device. Depends on the images you given and layouts you specify)

However layout-xlarge is not the correct configuration for S4. xlarge is used for large tablets having 10" size

Renjith
  • 5,783
  • 9
  • 31
  • 42
0

Samsung galaxy s4, xperia Z, and HTC ONE all uses xhpdi resources. So you can put your resources (drawable, values, etc) in this density category. As currently Screen Density doesn't support xxhdpi, if you put your res in xxhdpi it will scale them down to xhdpi.

You can put your layout under screen size X-large.

For your second question, if you want to test your application in emulator, you can use Xperia z profile whose screen config is similar to samsung galaxy S4, provided by sony dev site follow this >> LINK <<.

hope this will help!!!

Nitin Joshi
  • 128
  • 1
  • 10
  • 1
    That's wrong! All this phones uses `xxhdpi` resources, if provided. Take a look again at the link you provided and see that even there, says that `Xperia Z` is a `xxhdpi` device. http://developer.sonymobile.com/knowledge-base/sony-add-on-sdk/install-the-sony-add-on-sdk/install-detailed-instructions/ – AlexAndro Dec 19 '13 at 14:12
  • Ya thanks for reminding but i have already used it. and try to put graphics for S4 resolution i.e (1920x1080) in xxhpdi, it will scale drawables in current scenario, i have already tested it and it will work fine in xhdpi folder. – Nitin Joshi Dec 26 '13 at 08:59