fix #2053, add back the setting for toggling photo brightness, disable by default
This commit is contained in:
parent
91a2ef72a7
commit
d4110f182e
|
@ -64,6 +64,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupAppPasswordProtection()
|
||||
setupFileDeletionPasswordProtection()
|
||||
setupDeleteEmptyFolders()
|
||||
setupAllowPhotoGestures()
|
||||
setupAllowDownGesture()
|
||||
setupAllowRotatingWithGestures()
|
||||
setupShowNotch()
|
||||
|
@ -348,6 +349,14 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun setupAllowPhotoGestures() {
|
||||
settings_allow_photo_gestures.isChecked = config.allowPhotoGestures
|
||||
settings_allow_photo_gestures_holder.setOnClickListener {
|
||||
settings_allow_photo_gestures.toggle()
|
||||
config.allowPhotoGestures = settings_allow_photo_gestures.isChecked
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupAllowDownGesture() {
|
||||
settings_allow_down_gesture.isChecked = config.allowDownGesture
|
||||
settings_allow_down_gesture_holder.setOnClickListener {
|
||||
|
|
|
@ -269,7 +269,7 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
set(deleteEmptyFolders) = prefs.edit().putBoolean(DELETE_EMPTY_FOLDERS, deleteEmptyFolders).apply()
|
||||
|
||||
var allowPhotoGestures: Boolean
|
||||
get() = prefs.getBoolean(ALLOW_PHOTO_GESTURES, true)
|
||||
get() = prefs.getBoolean(ALLOW_PHOTO_GESTURES, false)
|
||||
set(allowPhotoGestures) = prefs.edit().putBoolean(ALLOW_PHOTO_GESTURES, allowPhotoGestures).apply()
|
||||
|
||||
var allowVideoGestures: Boolean
|
||||
|
|
|
@ -555,6 +555,29 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_allow_photo_gestures_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:paddingStart="@dimen/normal_margin"
|
||||
android:paddingTop="@dimen/activity_margin"
|
||||
android:paddingEnd="@dimen/normal_margin"
|
||||
android:paddingBottom="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_allow_photo_gestures"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/allow_photo_gestures"
|
||||
app:switchPadding="@dimen/medium_margin" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_allow_down_gesture_holder"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue