Open 740638339 opened 5 years ago
Activity中包含多个fragment,跳转到其他activity,再次返回到fragment,Activity 中onresume 设置状态无效
------ activity onresume ------
//currentPosition 保存 fragment 位置
private void changeStatusBar() { if(currentPosition == 0 || currentPosition == 3 || currentPosition == 4){ StatusBarUtil.setDarkMode(this); }else { StatusBarUtil.setLightMode(this); } }
Activity中包含多个fragment,跳转到其他activity,再次返回到fragment,Activity 中onresume 设置状态无效
------ activity onresume ------
//currentPosition 保存 fragment 位置
private void changeStatusBar() { if(currentPosition == 0 || currentPosition == 3 || currentPosition == 4){ StatusBarUtil.setDarkMode(this); }else { StatusBarUtil.setLightMode(this); } }