Android Marshmallow 中的屏幕方向更改导致应用程序崩溃时的权限对话框
Permission Dialog while Screen Orientation change in Android Marshmallow crashing the App
如何在 Android M 设备屏幕方向期间处理权限对话框?
在我的例子中,更改屏幕方向后,单击权限对话框中的“确定”按钮会使应用程序崩溃。
我针对这种情况的解决方法:
出现权限对话框后,我将屏幕锁定到当前方向 (portrait/landscape)。当用户按下按钮时,我正在解锁屏幕。
关于Locking/unlocking方向,参考link:
Android: Temporarily disable orientation changes in an Activity
如何在 Android M 设备屏幕方向期间处理权限对话框?
在我的例子中,更改屏幕方向后,单击权限对话框中的“确定”按钮会使应用程序崩溃。
我针对这种情况的解决方法: 出现权限对话框后,我将屏幕锁定到当前方向 (portrait/landscape)。当用户按下按钮时,我正在解锁屏幕。
关于Locking/unlocking方向,参考link: Android: Temporarily disable orientation changes in an Activity