Improve double-tap zoom in reader
This commit is contained in:
@@ -136,7 +136,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'io.coil-kt:coil-base:2.6.0'
|
implementation 'io.coil-kt:coil-base:2.6.0'
|
||||||
implementation 'io.coil-kt:coil-svg:2.6.0'
|
implementation 'io.coil-kt:coil-svg:2.6.0'
|
||||||
implementation 'com.github.KotatsuApp:subsampling-scale-image-view:02e6d6cfe9'
|
implementation 'com.github.KotatsuApp:subsampling-scale-image-view:8cafac256e'
|
||||||
implementation 'com.github.solkin:disk-lru-cache:1.4'
|
implementation 'com.github.solkin:disk-lru-cache:1.4'
|
||||||
implementation 'io.noties.markwon:core:4.6.2'
|
implementation 'io.noties.markwon:core:4.6.2'
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ abstract class BasePageHolder<B : ViewBinding>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected fun SubsamplingScaleImageView.applyDownsampling(isForeground: Boolean) {
|
protected fun SubsamplingScaleImageView.applyDownsampling(isForeground: Boolean) {
|
||||||
downsampling = when {
|
downSampling = when {
|
||||||
isForeground || !settings.isReaderOptimizationEnabled -> 1
|
isForeground || !settings.isReaderOptimizationEnabled -> 1
|
||||||
context.isLowRamDevice() -> 8
|
context.isLowRamDevice() -> 8
|
||||||
else -> 4
|
else -> 4
|
||||||
|
|||||||
@@ -97,8 +97,8 @@ class WebtoonImageView @JvmOverloads constructor(
|
|||||||
setMeasuredDimension(desiredWidth, desiredHeight)
|
setMeasuredDimension(desiredWidth, desiredHeight)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDownsamplingChanged() {
|
override fun onDownSamplingChanged() {
|
||||||
super.onDownsamplingChanged()
|
super.onDownSamplingChanged()
|
||||||
post {
|
post {
|
||||||
adjustScale()
|
adjustScale()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:defaultFocusHighlightEnabled="false"
|
android:defaultFocusHighlightEnabled="false"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
|
app:doubleTapZoomStyle="center"
|
||||||
app:restoreStrategy="deferred" />
|
app:restoreStrategy="deferred" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
Reference in New Issue
Block a user