add a switch for toggling root access
This commit is contained in:
parent
2bf39803de
commit
2aafa3344b
20 changed files with 82 additions and 0 deletions
|
@ -67,4 +67,8 @@ class Config(context: Context) : BaseConfig(context) {
|
|||
}
|
||||
|
||||
fun hasCustomSorting(path: String) = prefs.contains(SORT_FOLDER_PREFIX + path)
|
||||
|
||||
var enableRootAccess: Boolean
|
||||
get() = prefs.getBoolean(ENABLE_ROOT_ACCESS, false)
|
||||
set(enableRootAccess) = prefs.edit().putBoolean(ENABLE_ROOT_ACCESS, enableRootAccess).apply()
|
||||
}
|
||||
|
|
|
@ -10,3 +10,4 @@ val FAVORITES = "favorites"
|
|||
val SORT_ORDER = "sort_order"
|
||||
val SORT_FOLDER_PREFIX = "sort_folder_"
|
||||
val TEMPORARILY_SHOW_HIDDEN = "temporarily_show_hidden"
|
||||
val ENABLE_ROOT_ACCESS = "enable_root_access"
|
||||
|
|
|
@ -23,6 +23,7 @@ class SettingsActivity : SimpleActivity() {
|
|||
setupManageFavorites()
|
||||
setupShowHidden()
|
||||
setupPasswordProtection()
|
||||
setupEnableRootAccess()
|
||||
updateTextColors(settings_holder)
|
||||
}
|
||||
|
||||
|
@ -69,4 +70,12 @@ class SettingsActivity : SimpleActivity() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupEnableRootAccess() {
|
||||
settings_enable_root_access.isChecked = config.enableRootAccess
|
||||
settings_enable_root_access_holder.setOnClickListener {
|
||||
settings_enable_root_access.toggle()
|
||||
config.enableRootAccess = settings_enable_root_access.isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,5 +88,25 @@
|
|||
android:text="@string/password_protect_hidden_items"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/settings_enable_root_access_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:padding="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
||||
android:id="@+id/settings_enable_root_access"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@null"
|
||||
android:clickable="false"
|
||||
android:paddingLeft="@dimen/medium_margin"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:text="@string/enable_root_access"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Jít na oblíbené</string>
|
||||
<string name="favorites_activity_placeholder">Můžete přidat často využívané složky do oblíbených pro jednoduchý přístup odkudkoli.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Jednoduchý správce souborů pro procházení a úpravu souborů i složek.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Go to favorite</string>
|
||||
<string name="favorites_activity_placeholder">You can add frequently used folders to favorites for easy access from anywhere.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">A simple file manager for browsing and editing files and directories.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Ir a favoritos</string>
|
||||
<string name="favorites_activity_placeholder">Puede agregar carpetas de uso frecuente a favoritos para facilitar el acceso desde cualquier lugar.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Un simple administrador de archivos para navegar por el árbol de directorios.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Go to favorite</string>
|
||||
<string name="favorites_activity_placeholder">You can add frequently used folders to favorites for easy access from anywhere.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Un gestionnaire de fichiers simple pour naviguer et éditer ses fichiers et dossiers.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Ugrás kedvenchez</string>
|
||||
<string name="favorites_activity_placeholder">A gyakran használt mappákat kedvencnek jelölheted, hogy bárhonnan könnyen elérd őket.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Egyszerű fájlkezelő fájlok és könyvtárak böngészéséhez és szerkesztéséhez.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Vai al preferito</string>
|
||||
<string name="favorites_activity_placeholder">Puoi aggiungere le cartelle usate frequentemente ai preferiti per un rapido accesso da qualsiasi posizione.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Un semplice file manager per sfogliare e modificare file e cartelle.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Go to favorite</string>
|
||||
<string name="favorites_activity_placeholder">You can add frequently used folders to favorites for easy access from anywhere.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">ファイルとディレクトリーを参照、編集するためのシンプルなファイルマネージャー。</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">즐겨찾기 이동</string>
|
||||
<string name="favorites_activity_placeholder">자주 사용하는 폴더를 즐겨찾기에 추가하여 어디서나 쉽게 접근 할 수 있습니다.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">파일 및 디렉토리를 찾아보고 편집 할 수 있는 간단한 파일 매니저입니다.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Przejdź do ulubionych</string>
|
||||
<string name="favorites_activity_placeholder">Możesz dodawać często używane foldery do ulubionych, aby ułatwić sobie do nich dostęp.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Prosty menedżer i edytor plików i folderów.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Ir para favorito</string>
|
||||
<string name="favorites_activity_placeholder">Pode adicionar pastas como favoritos, para um acesso mais rápido.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Um gerenciador de arquivos para explorar e editar as pastas e arquivos.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Ir para favorito</string>
|
||||
<string name="favorites_activity_placeholder">Pode adicionar pastas como favoritos para um acesso mais rápido.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Um gestor de ficheiros para explorar e editar os ficheiros e diretórios.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Открыть избранное</string>
|
||||
<string name="favorites_activity_placeholder">Вы можете добавить часто используемые папки в избранное для быстрого доступа к ним.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Простой файловый менеджер для просмотра и редактирования файлов и папок.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Ísť medzi obľúbené</string>
|
||||
<string name="favorites_activity_placeholder">Pre jednoduchý prístup k často používaným priečinkom si ich viete pridať medzi obľúbené</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Povoliť prístup ku koreňovým súborom</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Jednoduchý správca súborov pre prehliadanie a úpravu súborov a priečinkov.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Gå till favorit</string>
|
||||
<string name="favorites_activity_placeholder">Du kan lägga till ofta använda mappar i favoriter för enkel åtkomst överallt.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">En enkel filhanterare för att bläddra och redigera filer och kataloger.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Go to favorite</string>
|
||||
<string name="favorites_activity_placeholder">You can add frequently used folders to favorites for easy access from anywhere.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">Dosyaları ve dizinleri tarama ve düzenlemek için kullanılan bir dosya gezgini.</string>
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<string name="go_to_favorite">Go to favorite</string>
|
||||
<string name="favorites_activity_placeholder">You can add frequently used folders to favorites for easy access from anywhere.</string>
|
||||
|
||||
<!-- Settings -->
|
||||
<string name="enable_root_access">Enable root access</string>
|
||||
|
||||
<!-- Strings displayed only on Google Playstore. Optional, but good to have -->
|
||||
<!-- Short description has to have less than 80 chars -->
|
||||
<string name="app_short_description">A simple file manager for browsing and editing files and directories.</string>
|
||||
|
|
Loading…
Reference in a new issue