From e426e8775358675efe33468b983e8f5cae97b0b8 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sat, 24 Aug 2019 17:20:07 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 da1ce7511..7ed2418b2 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 @@ -181,11 +181,10 @@ class ReadMenu : FrameLayout { override fun onAnimationEnd(animation: Animation) { vw_menu_bg.onClick { runMenuOut() } - if (context.getPrefBoolean("hideNavigationBar")) { - vwNavigationBar.layoutParams.height = context.getNavigationBarHeight() - } else { - vwNavigationBar.layoutParams.height = 0 - } + val lp = vwNavigationBar.layoutParams + lp.height = if (context.getPrefBoolean("hideNavigationBar")) + context.getNavigationBarHeight() else 0 + vwNavigationBar.layoutParams = lp } override fun onAnimationRepeat(animation: Animation) {