[android-developers] Re: how can i check landscap orientation ?

2009-03-25 Thread suhas gavas
Hi make use of sensorListener and it will work . i have used the same .. when u use sensorlistener and sensormanager in ur view it has got an override method as onSizeChanged which return the width and height. so using change in size u will get the orientation Below is a

[android-developers] Re: how can i check landscap orientation ?

2009-03-25 Thread Dianne Hackborn
If you just want to find the current orientation of the screen, the sensor manager is just totally the wrong direction to take. What you want to do is use getResources().getConfiguration() (sorry I incorrectly previously posted to use getDisplayMetrics()). You can follow the docs on

[android-developers] Re: how can i check landscap orientation ?

2009-03-25 Thread Kather Jailani
Pls add andoid:configChanges=orientation|keyboard And override onConfigurationChanged and check the orientation against Configuration.ORIENTATION_LANDSCAPE or potrait On Mar 25, 2009 12:56 AM, Suman ipeg.stud...@gmail.com wrote: Hi Many thanks for replies. I actually want

[android-developers] Re: how can i check landscap orientation ?

2009-03-25 Thread Dianne Hackborn
On Wed, Mar 25, 2009 at 9:25 AM, Kather Jailani jail...@gmail.com wrote: Pls add andoid:configChanges=orientation|keyboard And override onConfigurationChanged and check the orientation against Configuration.ORIENTATION_LANDSCAPE or potrait Please don't do that unless you really have a good