You should be checking the DPI, not the absolute pixel count.  I dont know 
about the upside down part.

On Friday, July 27, 2012 3:49:42 PM UTC+8, limtc wrote:
>
> Thanks, this is what I am doing now. I wanted to support 
> portrait/landscape modes for 1280x720/800 device, so this is what I do, 
> sounds OK? So far my test seems to be fine, except sometimes it starts up 
> upside down for some tablet devices.
>
> Is any of the dimension is not 1280 I will stick to portrait mode.
>
>         Display display = getWindowManager().getDefaultDisplay();
>
>         width = display.getWidth();
>
>         height = display.getHeight();
>
>         
>
>         if (width < 1280 && height < 1280)
>
>             setRequestedOrientation(ActivityInfo.
> SCREEN_ORIENTATION_PORTRAIT);
>
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to