diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
index 040222a7b..92329d023 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SettingsActivity.kt
@@ -45,6 +45,7 @@ class SettingsActivity : SimpleActivity() {
setupReplaceShare()
setupPasswordProtection()
setupDeleteEmptyFolders()
+ setupAllowVideoGestures()
updateTextColors(settings_holder)
}
@@ -182,6 +183,14 @@ class SettingsActivity : SimpleActivity() {
}
}
+ private fun setupAllowVideoGestures() {
+ settings_allow_video_gestures.isChecked = config.allowVideoGestures
+ settings_allow_video_gestures_holder.setOnClickListener {
+ settings_allow_video_gestures.toggle()
+ config.allowVideoGestures = settings_allow_video_gestures.isChecked
+ }
+ }
+
private fun setupScreenRotation() {
settings_screen_rotation.text = getScreenRotationText()
settings_screen_rotation_holder.setOnClickListener {
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt
index f93bc617e..47c8f93b6 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt
@@ -14,6 +14,7 @@ import android.view.*
import android.view.animation.AnimationUtils
import android.widget.SeekBar
import android.widget.TextView
+import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getFormattedDuration
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.updateTextColors
@@ -85,6 +86,8 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
override fun onResume() {
super.onResume()
activity.updateTextColors(mView.video_holder)
+ mView.video_volume_controller.beVisibleIf(context.config.allowVideoGestures)
+ mView.video_brightness_controller.beVisibleIf(context.config.allowVideoGestures)
}
private fun setupPlayer() {
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt
index 58671c861..f8b61b8f8 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt
@@ -241,6 +241,10 @@ class Config(context: Context) : BaseConfig(context) {
get() = prefs.getBoolean(DELETE_EMPTY_FOLDERS, true)
set(deleteEmptyFolders) = prefs.edit().putBoolean(DELETE_EMPTY_FOLDERS, deleteEmptyFolders).apply()
+ var allowVideoGestures: Boolean
+ get() = prefs.getBoolean(ALLOW_VIDEO_GESTURES, true)
+ set(allowVideoGestures) = prefs.edit().putBoolean(ALLOW_VIDEO_GESTURES, allowVideoGestures).apply()
+
var slideshowInterval: Int
get() = prefs.getInt(SLIDESHOW_INTERVAL, SLIDESHOW_DEFAULT_INTERVAL)
set(slideshowInterval) = prefs.edit().putInt(SLIDESHOW_INTERVAL, slideshowInterval).apply()
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt
index e402e7b53..b6a5fbc45 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Constants.kt
@@ -35,6 +35,7 @@ val SCROLL_HORIZONTALLY = "scroll_horizontally"
val HIDE_SYSTEM_UI = "hide_system_ui"
val REPLACE_SHARE_WITH_ROTATE = "replace_share_with_rotate"
val DELETE_EMPTY_FOLDERS = "delete_empty_folders"
+val ALLOW_VIDEO_GESTURES = "allow_video_gestures"
// slideshow
val SLIDESHOW_INTERVAL = "slideshow_interval"
diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml
index 3eb8673df..ab5bd8f0e 100644
--- a/app/src/main/res/layout/activity_settings.xml
+++ b/app/src/main/res/layout/activity_settings.xml
@@ -308,6 +308,26 @@
+
+
+
+
+
+
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index 4bc4b8b14..064f7380e 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -116,6 +116,7 @@
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 33d812529..8ceb1f74e 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -116,6 +116,7 @@
Kacheln horizontal scrollen
Systemleisten ausblenden im Vollbild
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Teilen/Drehen im Vollbild-Menü vertauschen
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index d22244878..779ea07d3 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -116,6 +116,7 @@
Desplazar miniaturas horizontalmente
Ocultar automáticamente la interfaz de usuario del sistema en medios de pantalla completa
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Reemplazar Compartir con Girar en el menú de pantalla completa
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 6c5b2f717..f41202660 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -116,6 +116,7 @@
Défilement des mignatures horizontalement
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index c24b42b35..f8bbce01f 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -116,6 +116,7 @@
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 504074c43..1af0bd606 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -116,6 +116,7 @@
Scorri miniature orizzontalmente
Nascondi UI di sistema con media a schermo intero
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Sostituisci Condividi con Ruota a schermo intero
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index edcde8db9..5bb6e82f2 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -116,6 +116,7 @@
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 2f8cd067d..ec77abdff 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -116,6 +116,7 @@
Przewijaj miniatury poziomo
Ukrywaj interfejs przy pełnoekranowym podglądzie
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Zamień funkcję udostępniania na obracanie w menu pełnoekranowym
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 88d4621e9..17816a8f7 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -116,6 +116,7 @@
Rolar miniaturas horizontalmente
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 4e94ab418..41ff89b4c 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -116,6 +116,7 @@
Deslocação horizontal de miniaturas
Ocultar interface do sistema se em ecrã completo
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Substituir a opção Partilhar pela opção Rodar se em ecrã completo
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 04444d31f..26d1ef055 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -116,6 +116,7 @@
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 7722991ea..2cf132f11 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -116,6 +116,7 @@
Prehliadať miniatúry vodorovne
Automaticky skrývať systémové lišty pri celoobrazovkových médiách
Odstrániť prázdne priečinky po vymazaní ich obsahu
+ Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi
Nahradiť Zdieľanie s Otočením v celoobrazovkovom menu
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 95533a57e..043f1f72e 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -116,6 +116,7 @@
Rulla horisontellt genom miniatyrer
Dölj systemanvändargränssnittet automatiskt när media visas i helskärmsläge
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index 30bf6bd81..aade22087 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -116,6 +116,7 @@
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 2d544fb09..c8a8b6900 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -116,6 +116,7 @@
水平滚动缩略图
全屏时自动隐藏状态栏
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
替换全屏时菜单栏的“分享”为“旋转”
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 98c5e913e..9bf27b92e 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -116,6 +116,7 @@
橫向滑動縮圖
全螢幕時自動隱藏系統介面
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
將全螢幕選單的分享取代為旋轉
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ba76c736d..6acb28aed 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -116,6 +116,7 @@
Scroll thumbnails horizontally
Automatically hide system UI at fullscreen media
Delete empty folders after deleting their content
+ Allow controlling video volume and brightness with vertical gestures
Replace Share with Rotate at fullscreen menu