I'm building an Android app that resizes based on the screen size using different layout folders (i.e. large, xlarge, etc.).
The only problem is that I want to provide a way for users to switch between the small and large screen layouts, in case they have a pre-honeycomb tablet that doesn't recognize the xlarge tag, or the device is closer to phone size but still big enough that the user wants to use the tablet layouts.
Is there a way that I can create a button to switch layout folders? I still want to use the automatic folder selection based on screen size, I just ALSO want to be able to force the app to use one folder or the other.
Is that possible?
The android team encourage you to use the resource qualifiers for any kind of multiple devices support-ion. For example
layout-small for devices with small screens layout-ldpi for devices with low density layout-en for locales...
read this it will help you a lot
But generally NO, there is no programmatic way to do this, maybe there are some workarounds but I do not encourage to do that.
Also maybe you need to see the fragments design to understand the development of gui for different devices like tablets and phones...