2

Yes. I know this is an old answer. Don't beat me up first. I checked those questions and its always turn to determine the screen size, density, etc. Or someone may say the definition of tablet have not defined yet.

Then I can give a "definition" on it. It is the System UI is different on Android 3.x, 4.0, 4.1.(4.2 have been unified).

"HandSet" have two bars:
status bar:at the top of the screen, wifi icon, time, etc
navigation bar:at the bottom of the screen, BACK, HOME, CURRENT_APPS buttons

"Tablet" have only one bar at the bottom which is combined bar.

I don't care other Android version device is handset or tablet. The reason that it want to know is about the hiding bottom bar that the "handsets" can but "tablets" cannot. See http://bin-liu.blogspot.hk/2012/03/how-to-hide-and-display-navigation-bar.html . I can calulate extra screen space on "handset"the getRawWidth(), getRawHeight() methods) .I also can do on "tablets" but I should not do as the bar never hide.

Edit: OK, I know it is not absolutely sure that handset must be "two bar style" and tablet must be "one bottom bar style". I would like to detect weather a android device is "two bars style" or "one bottom bar style" on Android 4.0 or 4.1.

Yeung
  • 2,202
  • 2
  • 27
  • 50
  • "HandSet have two bars: status bar:at the top of the screen, wifi icon, time, etc navigation bar:at the bottom of the screen, BACK, HOME, CURRENT_APPS buttons" -- not necessarily. "Tablet have only one bar at the bottom which is combined bar" -- not necessarily. – CommonsWare Dec 12 '12 at 12:09
  • OK. I should make an subclass of my activity's root viewGroup (both width and height are match_parent) and override `onSizeChanged (int w, int h, int oldw, int oldh)` then I can get the correct width/height no matter which device I am using. – Yeung Aug 21 '13 at 08:24
  • possible duplicate of [How to detect device is Android phone or Android tablet?](http://stackoverflow.com/questions/11330363/how-to-detect-device-is-android-phone-or-android-tablet) – Trikaldarshiii Sep 08 '13 at 11:31

0 Answers0