show the button for temporarily displaying hidden folders at third party intents

This commit is contained in:
tibbi 2017-04-12 18:39:05 +02:00
parent 85f93ae4ca
commit 47a10afbb7
2 changed files with 15 additions and 7 deletions

View file

@ -75,13 +75,13 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
if (mIsThirdPartyIntent)
return false
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
}

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/temporarily_show_hidden"
android:title="@string/temporarily_show_hidden"
app:showAsAction="never"/>
</menu>