|
|
@ -87,9 +87,13 @@ class ImportBookActivity : VMBaseActivity<ImportBookViewModel>(R.layout.activity |
|
|
|
tv_path.text = tv_path.text.toString() + it.name + File.separator |
|
|
|
tv_path.text = tv_path.text.toString() + it.name + File.separator |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
doc?.listFiles()?.let { |
|
|
|
val docList = arrayListOf<DocumentFile>() |
|
|
|
importBookAdapter.setItems(it.toList()) |
|
|
|
doc?.listFiles()?.forEach { |
|
|
|
|
|
|
|
if (it.isDirectory || it.name?.endsWith(".txt", true) == true) { |
|
|
|
|
|
|
|
docList.add(it) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
importBookAdapter.setItems(docList) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|