|
@@ -2,6 +2,7 @@ package eu.kanade.mangafeed.ui.activity;
|
|
|
|
|
|
import android.content.Context;
|
|
|
import android.content.Intent;
|
|
|
+import android.os.Build;
|
|
|
import android.os.Bundle;
|
|
|
import android.view.MotionEvent;
|
|
|
import android.view.View;
|
|
@@ -55,6 +56,9 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|
|
setContentView(R.layout.activity_reader);
|
|
|
ButterKnife.bind(this);
|
|
|
|
|
|
+ if (prefs.useFullscreenSet())
|
|
|
+ enableFullScreen();
|
|
|
+
|
|
|
viewer = getViewer();
|
|
|
|
|
|
enableHardwareAcceleration();
|
|
@@ -75,10 +79,22 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|
|
viewer.setSelectedPage(pageIndex);
|
|
|
}
|
|
|
|
|
|
- public void hideStatusBar() {
|
|
|
- View decorView = getWindow().getDecorView();
|
|
|
- int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
|
|
|
- decorView.setSystemUiVisibility(uiOptions);
|
|
|
+ public void enableFullScreen() {
|
|
|
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
|
|
+ getWindow().getDecorView().setSystemUiVisibility(
|
|
|
+ View.SYSTEM_UI_FLAG_LOW_PROFILE
|
|
|
+ | View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
|
|
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
|
|
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
|
|
+ | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
|
|
+ | View.SYSTEM_UI_FLAG_FULLSCREEN
|
|
|
+ | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ getWindow().getDecorView().setSystemUiVisibility(
|
|
|
+ View.SYSTEM_UI_FLAG_LOW_PROFILE
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public void enableHardwareAcceleration() {
|