mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
show the button for temporarily displaying hidden folders at third party intents
This commit is contained in:
parent
85f93ae4ca
commit
47a10afbb7
2 changed files with 15 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
8
app/src/main/res/menu/menu_main_intent.xml
Normal file
8
app/src/main/res/menu/menu_main_intent.xml
Normal 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>
|
Loading…
Reference in a new issue