Chinaunix首页 | 论坛 | 博客
  • 博客访问: 152674
  • 博文数量: 26
  • 博客积分: 1555
  • 博客等级: 上尉
  • 技术积分: 236
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-16 17:37
个人简介

我在互联网世界等候各位。。。。。

文章分类

全部博文(26)

文章存档

2015年(1)

2011年(4)

2010年(2)

2009年(19)

我的朋友

分类:

2009-11-10 19:51:21

android.view.IWindowManager windowService = android.view.IWindowManager.Stub.asInterface(android.os.ServiceManager.getService(”window”));

try
{
if (windowService.getOrientation() == 0) //Orientation vertical
{
windowService.setOrientation(1); //Orientation horizontal
Log.i(”info”, “orientation 1 “+windowService.getOrientation());
}
else
{
Log.i(”info”, “orientation 0 “+windowService.getOrientation());
}
}
catch (DeadObjectException e)
{
e.printStackTrace();
}


阅读(1275) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~