From 47a10afbb7dce3ad8261f411a3b182b08a27fc64 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 12 Apr 2017 18:39:05 +0200 Subject: [PATCH] show the button for temporarily displaying hidden folders at third party intents --- .../gallery/activities/MainActivity.kt | 14 +++++++------- app/src/main/res/menu/menu_main_intent.xml | 8 ++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 app/src/main/res/menu/menu_main_intent.xml diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index a82906719..fd8d064f7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -75,13 +75,13 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } override fun onCreateOptionsMenu(menu: Menu): Boolean { - if (mIsThirdPartyIntent) - return false - - menuInflater.inflate(R.menu.menu_main, menu) - - menu.findItem(R.id.increase_column_count).isVisible = config.dirColumnCnt < 10 - menu.findItem(R.id.reduce_column_count).isVisible = config.dirColumnCnt > 1 + if (mIsThirdPartyIntent) { + menuInflater.inflate(R.menu.menu_main_intent, menu) + } else { + menuInflater.inflate(R.menu.menu_main, menu) + menu.findItem(R.id.increase_column_count).isVisible = config.dirColumnCnt < 10 + menu.findItem(R.id.reduce_column_count).isVisible = config.dirColumnCnt > 1 + } return true } diff --git a/app/src/main/res/menu/menu_main_intent.xml b/app/src/main/res/menu/menu_main_intent.xml new file mode 100644 index 000000000..f35d3fdb8 --- /dev/null +++ b/app/src/main/res/menu/menu_main_intent.xml @@ -0,0 +1,8 @@ + + + +