NavIcon Avatar fix (#2080)

* NavIcon Avatar fix

* Added in all three methods
This commit is contained in:
David 2021-02-16 18:45:45 +01:00 committed by GitHub
parent ff6bd6af3c
commit 2fea6011fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -699,11 +699,13 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
}
}
override fun onResourceReady(resource: Drawable, transition: Transition<in Drawable>?) {
mainToolbar.navigationIcon = resource
mainToolbar.navigationIcon = FixedSizeDrawable(resource, navIconSize, navIconSize)
}
override fun onLoadCleared(placeholder: Drawable?) {
mainToolbar.navigationIcon = placeholder
if (placeholder != null) {
mainToolbar.navigationIcon = FixedSizeDrawable(placeholder, navIconSize, navIconSize)
}
}
})
}