From 9688e98522b945be169a75ce09dec87ec4dfe830 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 2 Jun 2019 20:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/base/BaseActivity.kt | 30 ------------------- 1 file changed, 30 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 652976bcf..8fab7d576 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -57,36 +57,6 @@ abstract class BaseActivity : AppCompatActivity() { return super.onCreateOptionsMenu(menu) } -// @SuppressLint("PrivateApi") -// override fun onMenuOpened(featureId: Int, menu: Menu?): Boolean { -// if (menu != null) { -// //展开菜单显示图标 -// if (menu.javaClass.simpleName.equals("MenuBuilder", ignoreCase = true)) { -// try { -// var method = menu.javaClass.getDeclaredMethod("setOptionalIconsVisible", java.lang.Boolean.TYPE) -// method.isAccessible = true -// method.invoke(menu, true) -// method = menu.javaClass.getDeclaredMethod("getNonActionItems") -// val menuItems = method.invoke(menu) as ArrayList -// if (menuItems.isNotEmpty()) { -// for (menuItem in menuItems) { -// val drawable = menuItem.icon -// if (drawable != null) { -// drawable.mutate() -// drawable.setColorFilter( -// resources.getColor(R.color.tv_text_default), -// PorterDuff.Mode.SRC_ATOP -// ) -// } -// } -// } -// } catch (ignored: Exception) { -// } -// } -// } -// return super.onMenuOpened(featureId, menu) -// } - final override fun onOptionsItemSelected(item: MenuItem?): Boolean { item?.let { if (it.itemId == android.R.id.home) {