diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/data/Settings.java b/app/src/main/java/fr/gaulupeau/apps/Poche/data/Settings.java
index db6d414f6..28c88ee7a 100644
--- a/app/src/main/java/fr/gaulupeau/apps/Poche/data/Settings.java
+++ b/app/src/main/java/fr/gaulupeau/apps/Poche/data/Settings.java
@@ -368,6 +368,10 @@ public boolean isFullscreenArticleView() {
return getBoolean(R.string.pref_key_ui_article_fullscreen, false);
}
+ public boolean isAutoFullscreenArticleView() {
+ return getBoolean(R.string.pref_key_ui_article_fullscreen_auto, true);
+ }
+
public void setFullScreenArticleView(boolean value) {
setBoolean(R.string.pref_key_ui_article_fullscreen, value);
}
diff --git a/app/src/main/java/fr/gaulupeau/apps/Poche/ui/ReadArticleActivity.java b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/ReadArticleActivity.java
index 267a0da53..ec7efd7a9 100644
--- a/app/src/main/java/fr/gaulupeau/apps/Poche/ui/ReadArticleActivity.java
+++ b/app/src/main/java/fr/gaulupeau/apps/Poche/ui/ReadArticleActivity.java
@@ -220,8 +220,7 @@ public void onCreate(Bundle savedInstanceState) {
// Hide status and action bar when scrolling down, show when scrolling up
// TODO: change to a method compatible with API 14.
- // TODO: Maybe implement an option in the settings menu to enable this?
- if (Build.VERSION.SDK_INT >= 23) {
+ if (Build.VERSION.SDK_INT >= 23 && settings.isAutoFullscreenArticleView()) {
scrollView.setOnScrollChangeListener(new View.OnScrollChangeListener(){
@Override
public void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {
diff --git a/app/src/main/res/values/strings-preference-keys.xml b/app/src/main/res/values/strings-preference-keys.xml
index 8d844c298..127edaa3c 100644
--- a/app/src/main/res/values/strings-preference-keys.xml
+++ b/app/src/main/res/values/strings-preference-keys.xml
@@ -35,6 +35,7 @@
ui.screenScrolling.smooth
ui.misc.category
ui.article.fullscreen
+ ui.article.fullscreen_auto
ui.disableTouch.enabled
ui.disableTouch.lastState
ui.disableTouch.keyCode
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 026771d3b..7015625c6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -198,6 +198,8 @@
Stretches lines to equal width (like in newspapers)
Fullscreen Article View
Hides system and app bars when reading articles
+ Fullscreen Article View on Scroll
+ Hides/Shows system and app bars automatically scroll. Only works on Android 6.0 and above.
Reading speed
Your reading speed (measured in words per minute). Used to calculate estimated reading time.
Keep screen on while reading
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index a0b976541..baac728b3 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -150,6 +150,11 @@
android:title="@string/pref_name_ui_article_fullscreen"
android:summary="@string/pref_desc_ui_article_fullscreen"
android:defaultValue="false"/>
+