Fix pages max scale
This commit is contained in:
@@ -49,7 +49,10 @@ class PageHolder(parent: ViewGroup, private val loader: PageLoader) :
|
||||
}
|
||||
}
|
||||
|
||||
override fun onReady() = Unit
|
||||
override fun onReady() {
|
||||
ssiv.maxScale = 2f * maxOf(ssiv.width / ssiv.sWidth.toFloat(), ssiv.height / ssiv.sHeight.toFloat())
|
||||
ssiv.resetScaleAndCenter()
|
||||
}
|
||||
|
||||
override fun onImageLoadError(e: Exception) = onError(e)
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ class WebtoonHolder(parent: ViewGroup, private val loader: PageLoader) :
|
||||
}
|
||||
|
||||
override fun onReady() {
|
||||
ssiv.maxScale = 2f * ssiv.width / ssiv.sWidth.toFloat()
|
||||
ssiv.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CUSTOM)
|
||||
ssiv.minScale = ssiv.width / ssiv.sWidth.toFloat()
|
||||
ssiv.setScaleAndCenter(
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="centerInside"
|
||||
app:layout_constraintDimensionRatio="13:18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:scaleType="centerCrop"
|
||||
app:layout_constraintDimensionRatio="13:18"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
android:id="@+id/imageView_cover"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:orientation="vertical" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
Reference in New Issue
Block a user