From f87efa47cad838b5ec07cbad647b78eeb2bdd330 Mon Sep 17 00:00:00 2001 From: GKF Date: Thu, 30 May 2019 14:25:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E8=8F=9C=E5=8D=95=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/base/BaseActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt index a1e6d5cc7..368f60519 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -33,8 +33,8 @@ abstract class BaseActivity : AppCompatActivity() { * 设置MENU图标颜色 */ override fun onCreateOptionsMenu(menu: Menu): Boolean { - val primaryTextColor = - MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.primaryColor(this))) + val primaryTextColor = MaterialValueHelper + .getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.primaryColor(this))) for (i in 0 until menu.size()) { val drawable = menu.getItem(i).icon if (drawable != null) { @@ -56,7 +56,7 @@ abstract class BaseActivity : AppCompatActivity() { method.invoke(menu, true) method = menu.javaClass.getDeclaredMethod("getNonActionItems") val menuItems = method.invoke(menu) as ArrayList - if (!menuItems.isEmpty()) { + if (menuItems.isNotEmpty()) { for (menuItem in menuItems) { val drawable = menuItem.icon if (drawable != null) {