我有一个ViewSwitcher包含LinearLayout位置 0 和ImageView位置 1 的一个。
现在我希望LinearLayoutonly 显示为Portrait,并且当ImageView显示 时,让用户有机会旋转设备并在横向模式下查看该视图。
所以,我在我的文件中添加android:configChanges="orientation"了活动。AndroidManifest.xml
然后我需要onConfigurationChanged (Configuration newConfig)在我的活动中覆盖,但我找不到任何方法来获得我想要的......
我尝试newConfig.orientation在调用之前直接编辑参数super.onConfigurationChanged(newConfig),并创建一个新Configuration的 fromnewConfig和 usingupdateFrom方法,但它不起作用。
任何想法?
谢谢