NavIcon Avatar fix (#2080)
* NavIcon Avatar fix * Added in all three methods
This commit is contained in:
parent
ff6bd6af3c
commit
2fea6011fd
1 changed files with 5 additions and 3 deletions
|
@ -694,16 +694,18 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
|
||||||
.into(object : CustomTarget<Drawable>(navIconSize, navIconSize) {
|
.into(object : CustomTarget<Drawable>(navIconSize, navIconSize) {
|
||||||
|
|
||||||
override fun onLoadStarted(placeholder: Drawable?) {
|
override fun onLoadStarted(placeholder: Drawable?) {
|
||||||
if(placeholder != null) {
|
if (placeholder != null) {
|
||||||
mainToolbar.navigationIcon = FixedSizeDrawable(placeholder, navIconSize, navIconSize)
|
mainToolbar.navigationIcon = FixedSizeDrawable(placeholder, navIconSize, navIconSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
override fun onResourceReady(resource: Drawable, transition: Transition<in Drawable>?) {
|
override fun onResourceReady(resource: Drawable, transition: Transition<in Drawable>?) {
|
||||||
mainToolbar.navigationIcon = resource
|
mainToolbar.navigationIcon = FixedSizeDrawable(resource, navIconSize, navIconSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLoadCleared(placeholder: Drawable?) {
|
override fun onLoadCleared(placeholder: Drawable?) {
|
||||||
mainToolbar.navigationIcon = placeholder
|
if (placeholder != null) {
|
||||||
|
mainToolbar.navigationIcon = FixedSizeDrawable(placeholder, navIconSize, navIconSize)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue