How to make Android system force LANDSCAPE for all apk?

六眼飞鱼酱① 提交于 2019-12-23 17:28:00

问题


To get this, I've made three kind of modify in android system(v4.04).They are: 1. WindowsManagerService.java, modified the getOrientationFromWindowsLocked(); 2. Activity.java, modified the onResume(); 3. PhoneWindowManager.java, modified the setInitialDisplaySize(); They all get work, but also with some side effect. So is there a better modify for this? Any suggestion will greatly appreciated. Thanks very much.


回答1:


According to me you have to modified your SensorManager class in android. The method provided is onSensorChange(). In this method you can write the code for your requirement i.e for Landscape mode.



来源:https://stackoverflow.com/questions/11062288/how-to-make-android-system-force-landscape-for-all-apk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!