mscwd01 wrote:
> Okay this is getting really rather annoying now.
> 
> I have used both of the following methods of getting the screen
> orientation and both do not work properly on different devices.
> 
> Method 1:
> Display display = ((WindowManager) getSystemService
> (WINDOW_SERVICE)).getDefaultDisplay();
> int screenOrientation = display.getOrientation();
> 
> Method 2:
> int screenOrientation = getResources().getConfiguration().orientation;
> 
> Both methods work fine on the HTC Hero; however, they both fail on the
> G1 and G2 devices (according to the users of my app).
> 
> How can we be expected to make high quality applications if the API is
> not supported on all devices???
> 
> I would be very greatful if someone could offer a solution to this,
> its just not acceptable.

I just tested this on a G1, and
getResources().getConfiguration().orientation is 2 in landscape and 1 in
portrait, just like it should be.

I also tested it on an HTC Magic, and it works just fine.

Heck, it even works on an ARCHOS 5 Android tablet.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

-- 
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