I am writing an application that needs to be supported on both android phones and tablets. I want to create a tablet-friendly UI for this application. As such, I want the app to be user-friendly both on small and large screens. As specified here: Supporting Multiple Screens, I can create different layout files for different screen resolutions, as well as different drawables for different densities, which is very good.
On top of that, I’d like to use the features of android 3+, like fragments, which are ideal for large screens. A layout which fits a small screen nicely will, in many cases, look poorly on tablets, so fragments would come in handy. However, if I use fragments and target my app for Android 2.2, it won’t compile.
So what are the options for this? Should I create a completely different Tablet version of the app? Is there another better way?
You’ll need to use the Android Compatibility Package (http://developer.android.com/sdk/compatibility-library.html) in order to do this.
It will backport the fragment features back to 1.6 or something.