From 9d3b1796be1a943a14cd7df903ec03b58a6ab909 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 25 Jan 2021 14:34:27 +0100 Subject: [PATCH] adding a menu item for toggling filename visibility --- app/build.gradle | 2 +- .../filemanager/pro/activities/MainActivity.kt | 6 ++++++ app/src/main/res/menu/menu.xml | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 3e242249..f45b6af9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.33.9' + implementation 'com.simplemobiletools:commons:5.33.10' implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.alexvasilkov:gesture-views:2.5.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt index d96e641e..977fbba9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/activities/MainActivity.kt @@ -91,6 +91,7 @@ class MainActivity : SimpleActivity() { findItem(R.id.remove_favorite).isVisible = favorites.contains(fragment.currentPath) findItem(R.id.go_to_favorite).isVisible = favorites.isNotEmpty() + findItem(R.id.toggle_filename).isVisible = config.getFolderViewType(fragment.currentPath) == VIEW_TYPE_GRID findItem(R.id.go_home).isVisible = fragment.currentPath != config.homeFolder findItem(R.id.set_as_home).isVisible = fragment.currentPath != config.homeFolder @@ -111,6 +112,7 @@ class MainActivity : SimpleActivity() { R.id.sort -> showSortingDialog() R.id.add_favorite -> addFavorite() R.id.remove_favorite -> removeFavorite() + R.id.toggle_filename -> toggleFilenameVisibility() R.id.set_as_home -> setAsHome() R.id.change_view_type -> changeViewType() R.id.temporarily_show_hidden -> tryToggleTemporarilyShowHidden() @@ -267,6 +269,10 @@ class MainActivity : SimpleActivity() { config.removeFavorite(fragment.currentPath) } + private fun toggleFilenameVisibility() { + + } + private fun goToFavorite() { val favorites = config.favorites val items = ArrayList(favorites.size) diff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml index c2fb70b6..5a05ed3c 100644 --- a/app/src/main/res/menu/menu.xml +++ b/app/src/main/res/menu/menu.xml @@ -32,6 +32,11 @@ android:icon="@drawable/ic_star_on_vector" android:title="@string/remove_from_favorites" app:showAsAction="ifRoom"/> +