Fixed BottomNavigation crashes

This commit is contained in:
Prathamesh More 2022-05-26 15:55:43 +05:30
parent 29671a374e
commit 097d646635
2 changed files with 6 additions and 1 deletions

View file

@ -119,6 +119,11 @@ fun BottomNavigationView.show() {
fun BottomNavigationView.hide() {
if (isGone) return
if (!isLaidOut) {
isGone = true
return
}
val drawable = BitmapDrawable(context.resources, drawToBitmap())
val parent = parent as ViewGroup
drawable.setBounds(left, top, right, bottom)