It just got a better name in API 8. To run on older platforms, just use the older api Display.getOrientation(). It returns the same thing. (And it will work on newer platforms as well.)
On Tue, Oct 5, 2010 at 5:36 PM, Nathan <critter...@crittermap.com> wrote: > On Oct 5, 4:41 pm, TreKing <treking...@gmail.com> wrote: > > On Tue, Oct 5, 2010 at 6:33 PM, Nathan <critter...@crittermap.com> > wrote: > > > But how do I tell which landscape? > > > > This might help< > http://android-developers.blogspot.com/2010/09/one-screen-turn-deserv...> > > . > > > > Yes, that's it exactly. > > This advice is wise: > Applications that match sensor data to on-screen display must always > use android.view.Display.getRotation() to map sensor coordinates to > screen coordinates — even if their manifest specifies portrait-only > display. > > However, this statement is simply not true: > Okay, now we’ve got a technique that we can rely on to work on all > devices. > > android.view.Display.getRotation() is supposed to solve everything. > > But it only works in API 8 and above. > > So I certainly hope no 2.1 devices or lower devices have these > rotation issues. > > My Nexus One has two landscape modes in 2.2, but it may have had both > in 2.1 as well. Anyone know? > > Nathan > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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