fix #333, add a switch for disabling video gestures
This commit is contained in:
parent
9fe361ea62
commit
01495680cb
23 changed files with 55 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -308,6 +308,26 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_allow_video_gestures_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_allow_video_gestures"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/allow_video_gestures"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_screen_rotation_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Kacheln horizontal scrollen</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Systemleisten ausblenden im Vollbild</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Teilen/Drehen im Vollbild-Menü vertauschen</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Desplazar miniaturas horizontalmente</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Ocultar automáticamente la interfaz de usuario del sistema en medios de pantalla completa</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Reemplazar Compartir con Girar en el menú de pantalla completa</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Défilement des mignatures horizontalement</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scorri miniature orizzontalmente</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Nascondi UI di sistema con media a schermo intero</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Sostituisci Condividi con Ruota a schermo intero</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Przewijaj miniatury poziomo</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Ukrywaj interfejs przy pełnoekranowym podglądzie</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Zamień funkcję udostępniania na obracanie w menu pełnoekranowym</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Rolar miniaturas horizontalmente</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Deslocação horizontal de miniaturas</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Ocultar interface do sistema se em ecrã completo</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Substituir a opção Partilhar pela opção Rodar se em ecrã completo</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Prehliadať miniatúry vodorovne</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automaticky skrývať systémové lišty pri celoobrazovkových médiách</string>
|
||||
<string name="delete_empty_folders">Odstrániť prázdne priečinky po vymazaní ich obsahu</string>
|
||||
<string name="allow_video_gestures">Povoliť ovládanie hlasitosti a jasu videí vertikálnymi ťahmi</string>
|
||||
<string name="replace_share_with_rotate">Nahradiť Zdieľanie s Otočením v celoobrazovkovom menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Rulla horisontellt genom miniatyrer</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Dölj systemanvändargränssnittet automatiskt när media visas i helskärmsläge</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">水平滚动缩略图</string>
|
||||
<string name="hide_system_ui_at_fullscreen">全屏时自动隐藏状态栏</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">替换全屏时菜单栏的“分享”为“旋转”</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">橫向滑動縮圖</string>
|
||||
<string name="hide_system_ui_at_fullscreen">全螢幕時自動隱藏系統介面</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">將全螢幕選單的分享取代為旋轉</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
|
@ -116,6 +116,7 @@
|
|||
<string name="scroll_thumbnails_horizontally">Scroll thumbnails horizontally</string>
|
||||
<string name="hide_system_ui_at_fullscreen">Automatically hide system UI at fullscreen media</string>
|
||||
<string name="delete_empty_folders">Delete empty folders after deleting their content</string>
|
||||
<string name="allow_video_gestures">Allow controlling video volume and brightness with vertical gestures</string>
|
||||
<string name="replace_share_with_rotate">Replace Share with Rotate at fullscreen menu</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
|
|
Loading…
Reference in a new issue