Suresh Sharma
Suresh Sharma

Reputation: 1844

How to design layout for S4

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

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.

Upvotes: 3

Views: 7233

Answers (3)

Nitin Joshi
Nitin Joshi

Reputation: 128

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!!!

Upvotes: 0

Basim Sherif
Basim Sherif

Reputation: 5440

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

Upvotes: 5

Renjith
Renjith

Reputation: 5803

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

Upvotes: 2

Related Questions