add a "Temporarily show hidden" menu button to media view
This commit is contained in:
parent
f137f3db06
commit
2b95a7f529
|
@ -88,6 +88,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
MyScalableRecyclerView.mListener = null
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
config.temporarilyShowHidden = false
|
||||
}
|
||||
|
||||
private fun tryloadGallery() {
|
||||
if (hasWriteStoragePermission()) {
|
||||
val dirName = getHumanizedFilename(mPath)
|
||||
|
@ -144,6 +149,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
R.id.hide_folder -> tryHideFolder()
|
||||
R.id.unhide_folder -> unhideFolder()
|
||||
R.id.exclude_folder -> tryExcludeFolder()
|
||||
R.id.temporarily_show_hidden -> temporarilyShowHidden()
|
||||
R.id.increase_column_count -> increaseColumnCount()
|
||||
R.id.reduce_column_count -> reduceColumnCount()
|
||||
R.id.settings -> launchSettings()
|
||||
|
@ -243,6 +249,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
false
|
||||
}
|
||||
|
||||
private fun temporarilyShowHidden() {
|
||||
config.temporarilyShowHidden = true
|
||||
getMedia()
|
||||
}
|
||||
|
||||
private fun handleZooming() {
|
||||
val layoutManager = media_grid.layoutManager as GridLayoutManager
|
||||
layoutManager.spanCount = config.mediaColumnCnt
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
android:id="@+id/exclude_folder"
|
||||
android:title="@string/exclude"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/temporarily_show_hidden"
|
||||
android:title="@string/temporarily_show_hidden"
|
||||
app:showAsAction="never"/>
|
||||
<item
|
||||
android:id="@+id/increase_column_count"
|
||||
android:title="@string/increase_column_count"
|
||||
|
|
Loading…
Reference in New Issue