Small fix

This commit is contained in:
tom5079
2019-06-02 01:04:16 +09:00
parent 530da98ec6
commit 1faf6cb208
2 changed files with 24 additions and 21 deletions

View File

@@ -573,7 +573,6 @@ class MainActivity : AppCompatActivity() {
}
if (next is LinearLayout) {
Log.d("Pupil", "hmm...")
val icon = next.findViewById<ImageView>(R.id.icon_next)
next.layoutParams.height = 1
icon.layoutParams.height = 1

View File

@@ -190,6 +190,7 @@ class ReaderActivity : AppCompatActivity() {
onNotifyChangedHandler = { notify ->
val fab = reader_fab_download
runOnUiThread {
if (notify) {
val icon = AnimatedVectorDrawableCompat.create(this, R.drawable.ic_downloading)
icon?.registerAnimationCallback(object: Animatable2Compat.AnimationCallback() {
@@ -210,10 +211,13 @@ class ReaderActivity : AppCompatActivity() {
fab.setImageDrawable(icon)
icon?.start()
} else {
runOnUiThread {
fab.setImageResource(R.drawable.ic_download)
}
}
}
}
}
if (downloader.download) {
downloader.invokeOnReaderLoaded()