Designing Android Apps for Tablets

Designing Android apps for tablets

Replacing folders layout-sw600dp, layout-sw600dp-land, layout-sw720dp and layout-sw720dp-land with layout-xlarge, layout-xlarge-land added a new message: "your apk does not seem to be designed for tablets."

Solved the problem after what's stated here.

Take advantage of extra screen area available on tablets

  • Look for opportunities to include additional content or use an alternative treatment of existing content.

  • Use multi-pane layouts on tablet screens to combine single views into a compound view. This lets you use the additional screen area more efficiently and makes it easier for users to navigate your app.

The problem was really the white space and had nothing to do with the xmls.

I managed to make the message for 7i tabs go away by rearranging the layouts to cover the screen and not leave too much white space. But not for the 10i tablets as the area is too big and my app has very less content. I must consider additional content.

Creating Android Application for tablet

To create app for all size you need should follow below point. It will help.

  1. You need to create set you layout for all layout.

  2. Ignore static value in your xml like margin, padding etc.
    if its necessary then use dimen.xml in your value folder.

  3. Please refer below link of android:
    http://developer.android.com/guide/practices/screens_support.html

  4. If necessary then use image (png).
  5. Try to use css(create xml) for selector and background. its auto manage for all layout.
  6. Try to use 9 patch images.
  7. Give support for all screen in manifest file

     < supports-screens 
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:anyDensity="true" />

Android supporting multiple resolution with multiple layout folder

Tutorial:
http://wptrafficanalyzer.in/blog/different-layouts-for-different-screen-sizes-in-android/

Designing an android tablet-only app

To get your app filtered for just
Tablets running ICS in Google-Play
you would do this in your AndroidManifest:

<supports-screens
android:largeScreens="true"
android:normalScreens="false"
android:requiresSmallestWidthDp="600"
android:smallScreens="false"
android:xlargeScreens="true" />

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />

To get HoneyComb Tablets aswell you simply change your minSdk

 <uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="14" />

Therefore your now saying Gingerbread (2.3) and below can't download your app (because they are not Tablets nor designed to work on tablets even if it is hacked in).

HoneyComb Tablets (3.0) is supported (because <3.2 is ignoring the requiresSmallestWidth attribute)

There are no phones running honeycomb

ICS Tablets are supported because it does look at your smallestWidth attribute

and finally ICS phones aren't because as we say ICS uses the smallestWidth attribute

Develop application only for tablet

As pointed out on the Best Practices section of the Android developer site:

If you don't want your app to be used on handsets (perhaps your app truly makes sense only on a large screen) or you need time to optimize it for smaller screens, you can prevent small-screen devices from downloading your app by using the <supports-screens> manifest element.

So, what you'll want to do is decide what screen size you consider to be tablets-on-up and only support those screens. For example, as suggested by the dev. site again, you might limit it to only large screens and larger¹ with the <supports-screen> element in your manifest, like so (also borrowed from the Android dev site):

<supports-screens
android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="600"
/>

This doesn't guarantee your app won't run on certain classes of very large phones ("phablets" as the youngsters like to call 'em), but that's just the nature of trying to limit it based on something as arbitrary in Android development as phone vs. tablet, especially when the real difference is just screen size. I could also mention that it's better to just build the tablet UI into your app, but that might involve some additional work depending on how different the two UIs are.

At any rate, your main problem is just going to be to decide how small is too small and limit it accordingly. Google Play should respect lower bounds for the screen size, but upper bounds in the <supports-screens> element will be ignored on larger screens, as the app will be run in compatibility mode instead. To prevent larger screens, for whatever reason, you'll want to use <compatible-screens>, which you probably won't want to do unless your UI is completely inflexible for some reason.

¹ This sounds weird.

How to design layout for 18 inch and above tablets?

Since you want to make your app for tablets you should choose Phone and Tablet.

You can restrict your app to only be distributed on a tablet. Like this:

<manifest ... >
<supports-screens android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="600" />
...
<application ... >
...
</application>

But it is recommended that you make your app support multiple screens



Related Topics



Leave a reply



Submit