(转自:http://blog.csdn.net/yuejingjiahong/article/details/6636981)
强制横屏:
1 @Override 2 protected void onResume() { 3 /** 4 * 设置为横屏 5 */ 6 if(getRequestedOrientation()!=ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE){ 7 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); 8 } 9 super.onResume(); 10 }
时间: 2024-10-29 09:27:53