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) {