My problem:
I'm developing an android application and I'm having trouble with the layout on nexus 6 phones.
I don't know which values folder would be applicable to best match nexus 6.
Details about Nexus 6:
density - 560 dpi
Screen display - resolution of 2560 x 1440 (493 ppi).
What I have tried:
Nexus 6 and Nexus 9 Screen density
http://android-developers.blogspot.in/2014/10/getting-your-apps-ready-for-nexus-6-and.html
My res-values structure:
I am also try the following dimens values.
My AndroidManifest.xml
<supports-screens
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
android:resizeable="true"/>
But always picks the default dimens values(1.0)..
Any body solve my problem..Thanks..
The values folders are usually qualified on basis of smallest width (sw360dp) or width(w360dp) instead of screen density (mdpi, hdpi etc) to maintain density independence.
For example, folders as:
values-sw320dp
values-sw360dp
values-sw600dp
This is because by giving dimensions in dp, it would automatically resize in form of pixels on different screen densities. With following convert ratios:
mdpi - 1
hdpi - 1.5
xhdpi - 2
xxhdpi - 3
xxxhdpi - 4
Screen density qualifier is preferred with drawable folders, as the image files are in pixels.
Nexus 6 has smallest width 360dp (configuration 360dp * 640dp) and xxxhdpi screen density. You can try using folder values-sw360dp for Nexus6.
In Android Studio, nexus 6, 5x and 6p, all three devices use dimensions from values-sw400dp folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With