6

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

Terms and concepts

Screen size Actual physical size, measured as the screen's diagonal. For simplicity, Android groups all actual screen sizes into four generalized sizes: small, normal, large, and extra large.

How do I programmatically get the generalized size of the device screen? The method or property I am looking for will return one of: small, normal, large, and extra large. (or const/enums that can be mapped to those)

Thanks.

-mz

mahboudz
  • 39,196
  • 16
  • 97
  • 124
  • Read this May this help you http://androidtrainningcenter.blogspot.in/2012/01/plan-design-in-best-way-for-multiple.html – Tofeeq Ahmad Feb 08 '12 at 12:44

1 Answers1

7

Use screenLayout in the Configuration object.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 3
    The code for this is shown in this question: http://stackoverflow.com/questions/5015094/determine-device-screen-category-small-normal-large-xlarge-using-code – stealthcopter May 14 '11 at 12:18