Improve non-fullscreen reading
This commit is contained in:
6 files changed
+36
-541
No files matched your search
@@ -377,12 +377,28 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
|
||||
// System UI helper
|
||||
if (Settings.getReadingFullscreen()) {
|
||||
int systemUiLevel;
|
||||
systemUiLevel = SystemUiHelper.LEVEL_IMMERSIVE;
|
||||
mSystemUiHelper = new SystemUiHelper(this, systemUiLevel,
|
||||
SystemUiHelper.FLAG_LAYOUT_IN_SCREEN_OLDER_DEVICES | SystemUiHelper.FLAG_IMMERSIVE_STICKY);
|
||||
mSystemUiHelper = new SystemUiHelper(this);
|
||||
mSystemUiHelper.hide();
|
||||
mShowSystemUi = false;
|
||||
} else {
|
||||
Window window = getWindow();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
View decorView = window.getDecorView();
|
||||
int flags = decorView.getSystemUiVisibility();
|
||||
if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_YES) <= 0) {
|
||||
flags |= View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
} else {
|
||||
flags &= ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
|
||||
}
|
||||
decorView.setSystemUiVisibility(flags);
|
||||
window.setStatusBarColor(AttrResources.getAttrColor(this, android.R.attr.colorBackground));
|
||||
} else {
|
||||
if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_YES) <= 0) {
|
||||
window.setStatusBarColor(AttrResources.getAttrColor(this, R.attr.colorPrimaryDark));
|
||||
} else {
|
||||
window.setStatusBarColor(AttrResources.getAttrColor(this, android.R.attr.colorBackground));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mMaskView = (ColorView) ViewUtils.$$(this, R.id.mask);
|
||||
|
||||
Reference in new issue
Block a user