|
@@ -266,7 +266,6 @@ class WebtoonPageHolder(
|
|
*/
|
|
*/
|
|
private fun setImage() {
|
|
private fun setImage() {
|
|
progressIndicator.setCompleteProgressAndHide()
|
|
progressIndicator.setCompleteProgressAndHide()
|
|
- progressContainer.isVisible = false
|
|
|
|
retryContainer?.isVisible = false
|
|
retryContainer?.isVisible = false
|
|
removeDecodeErrorLayout()
|
|
removeDecodeErrorLayout()
|
|
|
|
|
|
@@ -324,6 +323,13 @@ class WebtoonPageHolder(
|
|
initRetryLayout().isVisible = true
|
|
initRetryLayout().isVisible = true
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * Called when the image is decoded and going to be displayed.
|
|
|
|
+ */
|
|
|
|
+ private fun onImageDecoded() {
|
|
|
|
+ progressContainer.isVisible = false
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* Called when the image fails to decode.
|
|
* Called when the image fails to decode.
|
|
*/
|
|
*/
|
|
@@ -374,6 +380,10 @@ class WebtoonPageHolder(
|
|
setCropBorders(cropBorders)
|
|
setCropBorders(cropBorders)
|
|
setOnImageEventListener(
|
|
setOnImageEventListener(
|
|
object : SubsamplingScaleImageView.DefaultOnImageEventListener() {
|
|
object : SubsamplingScaleImageView.DefaultOnImageEventListener() {
|
|
|
|
+ override fun onReady() {
|
|
|
|
+ onImageDecoded()
|
|
|
|
+ }
|
|
|
|
+
|
|
override fun onImageLoadError(e: Exception) {
|
|
override fun onImageLoadError(e: Exception) {
|
|
onImageDecodeError()
|
|
onImageDecodeError()
|
|
}
|
|
}
|
|
@@ -505,6 +515,7 @@ class WebtoonPageHolder(
|
|
result.start()
|
|
result.start()
|
|
}
|
|
}
|
|
setImageDrawable(result)
|
|
setImageDrawable(result)
|
|
|
|
+ onImageDecoded()
|
|
},
|
|
},
|
|
onError = {
|
|
onError = {
|
|
onImageDecodeError()
|
|
onImageDecodeError()
|