do not allow disabling one finger zooming
This commit is contained in:
parent
bfaecc7eb5
commit
17e2e5ccfa
7 changed files with 3 additions and 48 deletions
|
@ -75,7 +75,7 @@ dependencies {
|
||||||
implementation 'com.squareup.picasso:picasso:2.71828'
|
implementation 'com.squareup.picasso:picasso:2.71828'
|
||||||
implementation 'com.caverock:androidsvg-aar:1.3'
|
implementation 'com.caverock:androidsvg-aar:1.3'
|
||||||
implementation 'com.github.tibbi:gestureviews:985ba285fb'
|
implementation 'com.github.tibbi:gestureviews:985ba285fb'
|
||||||
implementation 'com.github.tibbi:subsampling-scale-image-view:89c16d24c5'
|
implementation 'com.github.tibbi:subsampling-scale-image-view:40dc6ee2b1'
|
||||||
kapt 'com.github.bumptech.glide:compiler:4.8.0' // keep it here too, not just in Commons, else loading SVGs wont work
|
kapt 'com.github.bumptech.glide:compiler:4.8.0' // keep it here too, not just in Commons, else loading SVGs wont work
|
||||||
|
|
||||||
kapt 'androidx.room:room-compiler:2.0.0'
|
kapt 'androidx.room:room-compiler:2.0.0'
|
||||||
|
|
|
@ -70,7 +70,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
setupEnablePullToRefresh()
|
setupEnablePullToRefresh()
|
||||||
setupAllowZoomingImages()
|
setupAllowZoomingImages()
|
||||||
setupShowHighestQuality()
|
setupShowHighestQuality()
|
||||||
setupOneFingerZoom()
|
|
||||||
setupAllowOneToOneZoom()
|
setupAllowOneToOneZoom()
|
||||||
setupAllowInstantChange()
|
setupAllowInstantChange()
|
||||||
setupShowExtendedDetails()
|
setupShowExtendedDetails()
|
||||||
|
@ -402,7 +401,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateDeepZoomToggleButtons() {
|
private fun updateDeepZoomToggleButtons() {
|
||||||
settings_one_finger_zoom_holder.beVisibleIf(config.allowZoomingImages)
|
|
||||||
settings_show_highest_quality_holder.beVisibleIf(config.allowZoomingImages)
|
settings_show_highest_quality_holder.beVisibleIf(config.allowZoomingImages)
|
||||||
settings_allow_one_to_one_zoom_holder.beVisibleIf(config.allowZoomingImages)
|
settings_allow_one_to_one_zoom_holder.beVisibleIf(config.allowZoomingImages)
|
||||||
}
|
}
|
||||||
|
@ -415,14 +413,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupOneFingerZoom() {
|
|
||||||
settings_one_finger_zoom.isChecked = config.oneFingerZoom
|
|
||||||
settings_one_finger_zoom_holder.setOnClickListener {
|
|
||||||
settings_one_finger_zoom.toggle()
|
|
||||||
config.oneFingerZoom = settings_one_finger_zoom.isChecked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupAllowOneToOneZoom() {
|
private fun setupAllowOneToOneZoom() {
|
||||||
settings_allow_one_to_one_zoom.isChecked = config.allowOneToOneZoom
|
settings_allow_one_to_one_zoom.isChecked = config.allowOneToOneZoom
|
||||||
settings_allow_one_to_one_zoom_holder.setOnClickListener {
|
settings_allow_one_to_one_zoom_holder.setOnClickListener {
|
||||||
|
@ -612,7 +602,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
put(SCREEN_ROTATION, config.screenRotation)
|
put(SCREEN_ROTATION, config.screenRotation)
|
||||||
put(ALLOW_ZOOMING_IMAGES, config.allowZoomingImages)
|
put(ALLOW_ZOOMING_IMAGES, config.allowZoomingImages)
|
||||||
put(SHOW_HIGHEST_QUALITY, config.showHighestQuality)
|
put(SHOW_HIGHEST_QUALITY, config.showHighestQuality)
|
||||||
put(ONE_FINGER_ZOOM, config.oneFingerZoom)
|
|
||||||
put(ALLOW_ONE_TO_ONE_ZOOM, config.allowOneToOneZoom)
|
put(ALLOW_ONE_TO_ONE_ZOOM, config.allowOneToOneZoom)
|
||||||
put(SHOW_EXTENDED_DETAILS, config.showExtendedDetails)
|
put(SHOW_EXTENDED_DETAILS, config.showExtendedDetails)
|
||||||
put(HIDE_EXTENDED_DETAILS, config.hideExtendedDetails)
|
put(HIDE_EXTENDED_DETAILS, config.hideExtendedDetails)
|
||||||
|
@ -733,7 +722,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
SCREEN_ROTATION -> config.screenRotation = value.toInt()
|
SCREEN_ROTATION -> config.screenRotation = value.toInt()
|
||||||
ALLOW_ZOOMING_IMAGES -> config.allowZoomingImages = value.toBoolean()
|
ALLOW_ZOOMING_IMAGES -> config.allowZoomingImages = value.toBoolean()
|
||||||
SHOW_HIGHEST_QUALITY -> config.showHighestQuality = value.toBoolean()
|
SHOW_HIGHEST_QUALITY -> config.showHighestQuality = value.toBoolean()
|
||||||
ONE_FINGER_ZOOM -> config.oneFingerZoom = value.toBoolean()
|
|
||||||
ALLOW_ONE_TO_ONE_ZOOM -> config.allowOneToOneZoom = value.toBoolean()
|
ALLOW_ONE_TO_ONE_ZOOM -> config.allowOneToOneZoom = value.toBoolean()
|
||||||
SHOW_EXTENDED_DETAILS -> config.showExtendedDetails = value.toBoolean()
|
SHOW_EXTENDED_DETAILS -> config.showExtendedDetails = value.toBoolean()
|
||||||
HIDE_EXTENDED_DETAILS -> config.hideExtendedDetails = value.toBoolean()
|
HIDE_EXTENDED_DETAILS -> config.hideExtendedDetails = value.toBoolean()
|
||||||
|
|
|
@ -80,7 +80,6 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
private var mStoredHideExtendedDetails = false
|
private var mStoredHideExtendedDetails = false
|
||||||
private var mStoredAllowDeepZoomableImages = false
|
private var mStoredAllowDeepZoomableImages = false
|
||||||
private var mStoredShowHighestQuality = false
|
private var mStoredShowHighestQuality = false
|
||||||
private var mStoredAllowOneFingerZoom = false
|
|
||||||
private var mStoredExtendedDetails = 0
|
private var mStoredExtendedDetails = 0
|
||||||
|
|
||||||
private lateinit var mView: ViewGroup
|
private lateinit var mView: ViewGroup
|
||||||
|
@ -199,8 +198,7 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mWasInit) {
|
if (mWasInit) {
|
||||||
if (config.allowZoomingImages != mStoredAllowDeepZoomableImages || config.showHighestQuality != mStoredShowHighestQuality ||
|
if (config.allowZoomingImages != mStoredAllowDeepZoomableImages || config.showHighestQuality != mStoredShowHighestQuality) {
|
||||||
config.oneFingerZoom != mStoredAllowOneFingerZoom) {
|
|
||||||
mIsSubsamplingVisible = false
|
mIsSubsamplingVisible = false
|
||||||
mView.subsampling_view.beGone()
|
mView.subsampling_view.beGone()
|
||||||
loadImage()
|
loadImage()
|
||||||
|
@ -272,7 +270,6 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
mStoredHideExtendedDetails = hideExtendedDetails
|
mStoredHideExtendedDetails = hideExtendedDetails
|
||||||
mStoredAllowDeepZoomableImages = allowZoomingImages
|
mStoredAllowDeepZoomableImages = allowZoomingImages
|
||||||
mStoredShowHighestQuality = showHighestQuality
|
mStoredShowHighestQuality = showHighestQuality
|
||||||
mStoredAllowOneFingerZoom = oneFingerZoom
|
|
||||||
mStoredExtendedDetails = extendedDetails
|
mStoredExtendedDetails = extendedDetails
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -456,7 +453,6 @@ class PhotoFragment : ViewPagerFragment() {
|
||||||
regionDecoderFactory = regionDecoder
|
regionDecoderFactory = regionDecoder
|
||||||
maxScale = 10f
|
maxScale = 10f
|
||||||
beVisible()
|
beVisible()
|
||||||
isQuickScaleEnabled = config.oneFingerZoom
|
|
||||||
isOneToOneZoomEnabled = config.allowOneToOneZoom
|
isOneToOneZoomEnabled = config.allowOneToOneZoom
|
||||||
orientation = rotation + mCurrentRotationDegrees
|
orientation = rotation + mCurrentRotationDegrees
|
||||||
setImage(path)
|
setImage(path)
|
||||||
|
|
|
@ -206,10 +206,6 @@ class Config(context: Context) : BaseConfig(context) {
|
||||||
get() = prefs.getInt(getDirectoryColumnsField(), getDefaultDirectoryColumnCount())
|
get() = prefs.getInt(getDirectoryColumnsField(), getDefaultDirectoryColumnCount())
|
||||||
set(dirColumnCnt) = prefs.edit().putInt(getDirectoryColumnsField(), dirColumnCnt).apply()
|
set(dirColumnCnt) = prefs.edit().putInt(getDirectoryColumnsField(), dirColumnCnt).apply()
|
||||||
|
|
||||||
var oneFingerZoom: Boolean
|
|
||||||
get() = prefs.getBoolean(ONE_FINGER_ZOOM, false)
|
|
||||||
set(oneFingerZoom) = prefs.edit().putBoolean(ONE_FINGER_ZOOM, oneFingerZoom).apply()
|
|
||||||
|
|
||||||
var allowInstantChange: Boolean
|
var allowInstantChange: Boolean
|
||||||
get() = prefs.getBoolean(ALLOW_INSTANT_CHANGE, false)
|
get() = prefs.getBoolean(ALLOW_INSTANT_CHANGE, false)
|
||||||
set(allowInstantChange) = prefs.edit().putBoolean(ALLOW_INSTANT_CHANGE, allowInstantChange).apply()
|
set(allowInstantChange) = prefs.edit().putBoolean(ALLOW_INSTANT_CHANGE, allowInstantChange).apply()
|
||||||
|
|
|
@ -47,7 +47,6 @@ const val VIEW_TYPE_FILES = "view_type_files"
|
||||||
const val SHOW_EXTENDED_DETAILS = "show_extended_details"
|
const val SHOW_EXTENDED_DETAILS = "show_extended_details"
|
||||||
const val EXTENDED_DETAILS = "extended_details"
|
const val EXTENDED_DETAILS = "extended_details"
|
||||||
const val HIDE_EXTENDED_DETAILS = "hide_extended_details"
|
const val HIDE_EXTENDED_DETAILS = "hide_extended_details"
|
||||||
const val ONE_FINGER_ZOOM = "one_finger_zoom"
|
|
||||||
const val ALLOW_INSTANT_CHANGE = "allow_instant_change"
|
const val ALLOW_INSTANT_CHANGE = "allow_instant_change"
|
||||||
const val DO_EXTRA_CHECK = "do_extra_check"
|
const val DO_EXTRA_CHECK = "do_extra_check"
|
||||||
const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock"
|
const val WAS_NEW_APP_SHOWN = "was_new_app_shown_clock"
|
||||||
|
|
|
@ -819,30 +819,6 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_one_finger_zoom_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingRight="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_one_finger_zoom"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/one_finger_zoom"
|
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_allow_one_to_one_zoom_holder"
|
android:id="@+id/settings_allow_one_to_one_zoom_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.3.11'
|
ext.kotlin_version = '1.3.20'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
|
Loading…
Reference in a new issue