-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to select directories #6
Comments
This function is temporarily not supported, but you can modify part of the code to achieve it private fun initListRecyclerView() {
fileListAdapter = ZFileListAdapter(this).run {
itemClickByAnim = { v, _, item ->
if (item.isFile) {
ZFileUtil.openFile(item.filePath, v)
} else {
// ZFileLog.i("进入 ${item.filePath}")
// backList.add(item.filePath)
// filePathAdapter.addItem(filePathAdapter.itemCount, item.toPathBean())
// zfile_list_pathRecyclerView.scrollToPosition(filePathAdapter.itemCount - 1)
// getData(item.filePath)
// nowPath = item.filePath
getData(item.filePath)
}
}
...
}
}
private fun getData(filePath: String?) {
...
ZFileUtil.getList(this) {
if (isNullOrEmpty()) {
fileListAdapter?.clear()
zfile_list_emptyLayout.visibility = View.VISIBLE
} else {
// fileListAdapter?.setDatas(this)
ZFileLog.i("rootPath:$rootPath")
ZFileLog.i("nowPath:$nowPath")
if (rootPath == SD_ROOT && nowPath.isNull()) {
fileListAdapter?.setDatas(this)
zfile_list_emptyLayout.visibility = View.GONE
} else {
setResult(ZFILE_RESULT_CODE, Intent().apply {
putParcelableArrayListExtra(
ZFILE_SELECT_DATA_KEY,
this@getList as java.util.ArrayList<out Parcelable>
)
})
finish()
}
}
zfile_list_refreshLayout.isRefreshing = false
}
}
|
After this modification, there will be many problems, such as unable to enter the secondary directory. Better not to do this !!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need a fuction:
select a directory,and return the information of the files and directories those included by the directory.
The text was updated successfully, but these errors were encountered: