Sorry I meant "works on the HTC Hero" NOT magic ;) On Oct 31, 6:11 pm, mscwd01 <[email protected]> wrote: > Dianne, I have used the configuration to try and determine orientation > (see Method 2); however, this still fails on G1 and G2 devices. It > works on the HTC magic though. > > If you could offer some other solution i'd be very appreciative > indeed ;) > > On Oct 31, 6:00 pm, Dianne Hackborn <[email protected]> wrote: > > > I'll make this a little stronger -- the Display object is LOW LEVEL access > > to the display. Trying to use this in an application is almost guaranteed > > to not do what you want. The current orientation should be retrieved from > > Configuration. The width and height should be retrieved from the view > > hierarchy. > > > I believe that Display.getOrientation actually returns the physical rotation > > applied to the display... I also notice that the documentation says nothing > > about what it actually returns, so how can you use it correctly? :) (The > > Display object clearly needs a lot more documentation... but this is a > > pretty low priority because, again, it really shouldn't be used by > > applications.) > > > On Sat, Oct 31, 2009 at 5:08 AM, Mark Murphy <[email protected]>wrote: > > > > mscwd01 wrote: > > > > I added this to the activity tag in the manifest: > > > > android:screenOrientation="sensor" > > > > > Would that make any difference? > > > > That changes the trigger. For devices with a keyboard (e.g., G1), by > > > default, an orientation change is triggered by sliding the keyboard, not > > > the accelerometer. android:screenOrientation="sensor" forces it to be > > > the "sensor" (a.k.a., accelerometer) like the Magic, Hero, and other > > > keyboard-less devices. > > > > Since you are experiencing your problem with both the G1 (with keyboard) > > > and the Magic (sans keyboard), I doubt this will help, but I could > > > easily be wrong. > > > > -- > > > Mark Murphy (a Commons Guy) > > >http://commonsware.com|http://twitter.com/commonsguy > > > > Warescription: Three Android Books, Plus Updates, $35/Year > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to [email protected] > > > To unsubscribe from this group, send email to > > > [email protected]<android-developers%[email protected]> > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > Dianne Hackborn > > Android framework engineer > > [email protected] > > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

