diff --git a/app/src/app/res/xml/about.xml b/app/src/app/res/xml/about.xml
index 5b117e332..8a01589db 100644
--- a/app/src/app/res/xml/about.xml
+++ b/app/src/app/res/xml/about.xml
@@ -95,13 +95,13 @@
app:layout="@layout/view_preference_category">
(),
@@ -38,6 +39,7 @@ class FileManageActivity : VMBaseActivity(this@FileManageActivity) {
- private var rootPath: String? = null
- var currentPath: String? = null
- private set
- private val homeIcon = ConvertUtils.toDrawable(FilePickerIcon.getHome())!!
private val upIcon = ConvertUtils.toDrawable(FilePickerIcon.getUpDir())!!
private val folderIcon = ConvertUtils.toDrawable(FilePickerIcon.getFolder())!!
private val fileIcon = ConvertUtils.toDrawable(FilePickerIcon.getFile())!!
@@ -93,7 +97,14 @@ class FileManageActivity : VMBaseActivity
) {
- binding.imageView
+ if (!item.isDir) {
+ binding.imageView.setImageDrawable(fileIcon)
+ } else if (holder.layoutPosition == 0 && viewModel.subDocs.isNotEmpty()) {
+ binding.imageView.setImageDrawable(upIcon)
+ } else {
+ binding.imageView.setImageDrawable(folderIcon)
+ }
+ binding.textView.text = item.name
}
diff --git a/app/src/main/java/io/legado/app/ui/document/FileManageViewModel.kt b/app/src/main/java/io/legado/app/ui/document/FileManageViewModel.kt
index 147cb2d19..9b8090cd9 100644
--- a/app/src/main/java/io/legado/app/ui/document/FileManageViewModel.kt
+++ b/app/src/main/java/io/legado/app/ui/document/FileManageViewModel.kt
@@ -2,6 +2,13 @@ package io.legado.app.ui.document
import android.app.Application
import io.legado.app.base.BaseViewModel
+import io.legado.app.utils.FileDoc
class FileManageViewModel(application: Application) : BaseViewModel(application) {
+
+ val rootDoc = context.getExternalFilesDir(null)?.parentFile?.let {
+ FileDoc.fromFile(it)
+ }
+ val subDocs = arrayListOf()
+
}
\ No newline at end of file
diff --git a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
index 82bc35d2e..ad77bf8e9 100644
--- a/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
+++ b/app/src/main/java/io/legado/app/ui/main/my/MyFragment.kt
@@ -29,6 +29,7 @@ import io.legado.app.ui.book.toc.rule.TxtTocRuleActivity
import io.legado.app.ui.config.ConfigActivity
import io.legado.app.ui.config.ConfigTag
import io.legado.app.ui.dict.rule.DictRuleActivity
+import io.legado.app.ui.document.FileManageActivity
import io.legado.app.ui.replace.ReplaceRuleActivity
import io.legado.app.ui.widget.dialog.TextDialog
import io.legado.app.utils.*
@@ -150,6 +151,7 @@ class MyFragment : BaseFragment(R.layout.fragment_my_config) {
"theme_setting" -> startActivity {
putExtra("configTag", ConfigTag.THEME_CONFIG)
}
+ "fileManage" -> startActivity()
"readRecord" -> startActivity()
"donate" -> startActivity()
"about" -> startActivity()
diff --git a/app/src/main/res/drawable/ic_folder_outline.xml b/app/src/main/res/drawable/ic_folder_outline.xml
new file mode 100644
index 000000000..f034f89ae
--- /dev/null
+++ b/app/src/main/res/drawable/ic_folder_outline.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml
index dcddfafdc..736e4f1df 100644
--- a/app/src/main/res/values-es-rES/strings.xml
+++ b/app/src/main/res/values-es-rES/strings.xml
@@ -1088,4 +1088,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml
index 3b6e80d1e..224843eb1 100644
--- a/app/src/main/res/values-ja-rJP/strings.xml
+++ b/app/src/main/res/values-ja-rJP/strings.xml
@@ -1091,4 +1091,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index b1a5c919c..69145bbb9 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -1091,4 +1091,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml
index b79f955f1..4acd037f5 100644
--- a/app/src/main/res/values-zh-rHK/strings.xml
+++ b/app/src/main/res/values-zh-rHK/strings.xml
@@ -1088,4 +1088,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 5dbe9c3f9..d76e23c96 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -1090,4 +1090,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index 66c82ca46..5784a8d7d 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -1090,4 +1090,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 428fb91a1..b61366aae 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1091,4 +1091,5 @@
同意
拒绝
文件管理
+ 管理私有文件夹的文件
diff --git a/app/src/main/res/xml/about.xml b/app/src/main/res/xml/about.xml
index a5fe737f2..2933e4a09 100644
--- a/app/src/main/res/xml/about.xml
+++ b/app/src/main/res/xml/about.xml
@@ -89,13 +89,13 @@
app:layout="@layout/view_preference_category">
+
+