6
votes

Hello Everyone.........

I am working on android tablets that supports 1280x800 and 1024x600 resolution. What is the best approach for UI design to use dip or px for layout designing. My problem is I want to support all Android Tablets in market with both of these resolutions but there LCD density may vary between 160 to 240 dpi.

  • What to do in this situation?

  • Android tablets have 240 dpi density or 160 dpi density or may have both?

  • Please tell which tablets devices have which density support?

  • Is it possible to workon both densities with same screen resolution through same xml layout?

3

3 Answers

3
votes

For layout designing dip is definitely the best approach because you have density independence :

http://developer.android.com/guide/practices/screens_support.html

As far as I know, since dpi is dots per inch if you have one resolution you should only have one density.

For calculating easily density see :

http://members.ping.de/~sven/dpi.html

http://en.wikipedia.org/wiki/Comparison_of_Android_devices#Tablet_computers

4
votes

yes make sure, we make a single layout thate work for all screen or tabs in any density. Android provide multiple support screen features.

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

and also putup all imeges in

  1. hdpi folder
  2. mdpi folder
  3. ldpi folder
0
votes

I have just written a blog post to solve your problem: http://onemanmobile.blogspot.com/2012/04/how-to-scale-your-android-layouts-to.html

This will give you a tool so you only have to define your layout xml-files for a single density bucket (small/normal/large/xlarge) and have it scale proportionally for tablets and small devices.