1. setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
这样设置横屏,oncreate执行2遍。
这样设置横屏,oncreate执行1遍。
3.不设置横竖屏。把手机由竖屏转成横屏,onCreate执行2遍。
会在成android:screenOrientation="landscape"不起作用。
5.android:ConfigChanges,用于捕获手机状态的改变。
有总结的不对的,欢迎大家随时指教!