diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt index eb6d67b29..dccdce01e 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt @@ -199,13 +199,13 @@ class ReadMenu : FrameLayout { override fun onAnimationEnd(animation: Animation) { vw_menu_bg.onClick { runMenuOut() } - val lp = vwNavigationBar.layoutParams - lp.height = - if (context.getPrefBoolean("hideNavigationBar") - && Help.isNavigationBarExist(activity) - ) context.getNavigationBarHeight() - else 0 - vwNavigationBar.layoutParams = lp + vwNavigationBar.layoutParams = vwNavigationBar.layoutParams.apply { + height = + if (context.getPrefBoolean("hideNavigationBar") + && Help.isNavigationBarExist(activity) + ) context.getNavigationBarHeight() + else 0 + } } override fun onAnimationRepeat(animation: Animation) {