Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat's the best way to support Android 2.x tablets in my app?
    text
    copied!<p>I'm developing an Android app that absolutely needs to support Android 2.1+ devices, including tablets and phones.</p> <p>The tricky part is I want to be able to provide roughly the same user experience on Android 2.x tablets as on bone fide Honeycomb tablets. I'm planning on using the Compatibility package so that Fragment support is always available, but...</p> <p>The problem I've got at the moment is I've bought a Hannstab for testing, and discovered that it reports to apps that it has a "large" screen, despite actually being 10.1 inches. This would technically make it "xlarge", but of course that category was not included in Android 2.2 (which it runs), hence it's "large". I originally intended to just use resource qualifiers and treat all xlarge devices as tablets, and everything else as phones but now I realise I can't do that.</p> <p>Would it be so bad to treat all xlarge <strong>and</strong> large screened devices as tablets? This would include Dell Streaks and other 5 to 7 inch screen devices as I understand it.</p> <p>Is there a better alternative? I haven't really got my head around fragments properly yet so a fragments-based solution might be obvious to someone who has.</p> <p>I've noticed that typically, apps I install on my Hannspad use their normal phone UI, with the exception of Evernote which uses a specific tablet interface - I wish I knew how they'd done that.</p> <p>The new "Smallest Width" resource qualifier introduced in Android 3.2 would solve this problem by doing away with the generalised screen size buckets altogether. Presumably I could copy this approach by writing code to work out the screen width in dp and then adding fragments to the activity as appropriate. Is that wise? I'd rather avoid that kind of work if it's going to be a pain.</p> <p>Cheers</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload