|
|
|
|
@ -44,12 +44,16 @@ class WebtoonHolder(
|
|
|
|
|
override fun onLoadingStarted() {
|
|
|
|
|
binding.layoutError.isVisible = false
|
|
|
|
|
binding.progressBar.isVisible = true
|
|
|
|
|
binding.textViewProgress.isVisible = true
|
|
|
|
|
binding.ssiv.recycle()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onProgressChanged(progress: Int) {
|
|
|
|
|
binding.textViewProgress.text = if (progress in 0..100) "%d%%".format(progress) else null
|
|
|
|
|
if (progress in 0..100) {
|
|
|
|
|
binding.progressBar.isIndeterminate = false
|
|
|
|
|
binding.progressBar.setProgressCompat(progress, true)
|
|
|
|
|
} else {
|
|
|
|
|
binding.progressBar.isIndeterminate = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onImageReady(uri: Uri) {
|
|
|
|
|
@ -73,7 +77,6 @@ class WebtoonHolder(
|
|
|
|
|
|
|
|
|
|
override fun onImageShown() {
|
|
|
|
|
binding.progressBar.isVisible = false
|
|
|
|
|
binding.textViewProgress.isVisible = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onClick(v: View) {
|
|
|
|
|
@ -89,7 +92,6 @@ class WebtoonHolder(
|
|
|
|
|
)
|
|
|
|
|
binding.layoutError.isVisible = true
|
|
|
|
|
binding.progressBar.isVisible = false
|
|
|
|
|
binding.textViewProgress.isVisible = false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun getScrollY() = binding.ssiv.getScroll()
|
|
|
|
|
|