adding a More Apps From Us menu button

This commit is contained in:
tibbi 2022-11-17 21:39:23 +01:00
parent 69db31ae23
commit 2f0e4a3a3f
2 changed files with 7 additions and 0 deletions

View File

@ -172,6 +172,7 @@ class MainActivity : SimpleActivity() {
currentViewType == VIEW_TYPE_GRID && config.fileColumnCnt < MAX_COLUMN_COUNT && currentFragment !is StorageFragment
findItem(R.id.reduce_column_count).isVisible = currentViewType == VIEW_TYPE_GRID && config.fileColumnCnt > 1 && currentFragment !is StorageFragment
findItem(R.id.more_apps_from_us).isVisible = !resources.getBoolean(R.bool.hide_google_relations)
findItem(R.id.settings).isVisible = !isCreateDocumentIntent
findItem(R.id.about).isVisible = !isCreateDocumentIntent
}
@ -197,6 +198,7 @@ class MainActivity : SimpleActivity() {
R.id.stop_showing_hidden -> tryToggleTemporarilyShowHidden()
R.id.increase_column_count -> increaseColumnCount()
R.id.reduce_column_count -> reduceColumnCount()
R.id.more_apps_from_us -> launchMoreAppsFromUsIntent()
R.id.settings -> launchSettings()
R.id.about -> launchAbout()
else -> return@setOnMenuItemClickListener false

View File

@ -69,6 +69,11 @@
android:showAsAction="never"
android:title="@string/reduce_column_count"
app:showAsAction="never" />
<item
android:id="@+id/more_apps_from_us"
android:showAsAction="never"
android:title="@string/more_apps_from_us"
app:showAsAction="never" />
<item
android:id="@+id/settings"
android:icon="@drawable/ic_settings_cog_vector"