I'm developing an app which should work on a phone and on a tablet device. I tested it on the emulator and it worked fine. But when I start it on a real Samsung Tab, it uses the phone layouts. What qualifiers should I use in order to get the tablet using tablets layouts ? I tried with layout-sw600dp but it doesn't work.
Thanks !
A configuration qualifier is a string that you can append to a resource directory in your Android project and specifies the configuration for which the resources inside are designed.
Layout selection in Android devices is as follows
layout -> Default (Useful for Phone layouts), layout-large - > 5" to 7" tablets (like Galaxy Note, Kindle Fire etc), layout-xlarge -> above 7" tablets, layout-swdp -> regardless of the screen's current orientation, your application's has at least dps of width available for it UI.(Introduced in Android 3.2 and above , this may be the reson why 600dp dint work for you).
For more details http://developer.android.com/guide/practices/screens_support.html
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