Hi,
I think u can try the following code snippet.
WindowManager wm;
Display ds;
public boolean port;
public void checkOrientation() {
wm = getWindowManager();
ds=wm.getDefaultDisplay();
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
System.out.println("In onCreate................");
checkOrientation();
if (ds.getWidth() > ds.getHeight())
{
// ---landscape mode---
port = false;
} else if (ds.getWidth() < ds.getHeight())
{
// ---portrait mode---
port = true;
}
}
Hope this will help u.
Regards,
SREEHARI.
--
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