File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
kotlin/com/simplemobiletools/flashlight/activities Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ android {
6262}
6363
6464dependencies {
65- implementation ' com.github.SimpleMobileTools:Simple-Commons:9162225f33 '
65+ implementation ' com.github.SimpleMobileTools:Simple-Commons:af11ea2e30 '
6666 implementation ' org.greenrobot:eventbus:3.3.1'
6767 implementation ' androidx.constraintlayout:constraintlayout:2.1.4'
6868}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ class MainActivity : SimpleActivity() {
4343 setContentView(R .layout.activity_main)
4444 appLaunched(BuildConfig .APPLICATION_ID )
4545 setupOptionsMenu()
46+ refreshMenuItems()
4647
4748 mBus = EventBus .getDefault()
4849 changeIconColor(getContrastColor(), stroboscope_btn)
@@ -129,6 +130,7 @@ class MainActivity : SimpleActivity() {
129130 private fun setupOptionsMenu () {
130131 main_toolbar.setOnMenuItemClickListener { menuItem ->
131132 when (menuItem.itemId) {
133+ R .id.more_apps_from_us -> launchMoreAppsFromUsIntent()
132134 R .id.settings -> launchSettings()
133135 R .id.about -> launchAbout()
134136 else -> return @setOnMenuItemClickListener false
@@ -137,6 +139,12 @@ class MainActivity : SimpleActivity() {
137139 }
138140 }
139141
142+ private fun refreshMenuItems () {
143+ main_toolbar.menu.apply {
144+ findItem(R .id.more_apps_from_us).isVisible = ! resources.getBoolean(R .bool.hide_google_relations)
145+ }
146+ }
147+
140148 override fun onSaveInstanceState (outState : Bundle ) {
141149 outState.putBoolean(FLASHLIGHT_STATE , mIsFlashlightOn)
142150 outState.putBoolean(STROBOSCOPE_STATE , stroboscope_bar.isVisible())
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<menu xmlns : android =" http://schemas.android.com/apk/res/android"
33 xmlns : app =" http://schemas.android.com/apk/res-auto" >
4+ <item
5+ android : id =" @+id/more_apps_from_us"
6+ android : showAsAction =" never"
7+ android : title =" @string/more_apps_from_us"
8+ app : showAsAction =" never" />
49 <item
510 android : id =" @+id/settings"
611 android : icon =" @drawable/ic_settings_cog_vector"
You can’t perform that action at this time.
0 commit comments