Closed Weststreet closed 7 years ago
你好,横竖屏切换中有什么特殊操作么,如视频播放等
@Override public void onBackPressed() { Configuration cfg = getResources().getConfiguration();
if (cfg.orientation == Configuration.ORIENTATION_LANDSCAPE) {
onPortrait();
} else {
super.onBackPressed();
}
}
貌似是这段代码导致的。
是由于横竖屏切换时configurtion中与夜间模式相关的配置丢失了 ,可以选择把activity中resource代理 或者 在onConfigurationChanged回调中把当前的夜间模式状态再设置回去。
夜间模式下,在视频播放横竖屏切换后返回列表页面,多主题颜色发生异常了