mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
show full path at breadcrumbs if set so
This commit is contained in:
@ -25,11 +25,13 @@ class SelectFolderDialog : DialogFragment(), Breadcrumbs.BreadcrumbsListener {
|
||||
lateinit var mPath: String
|
||||
var mFirstUpdate: Boolean = true
|
||||
var mShowHidden: Boolean = false
|
||||
var mShowFullPath: Boolean = false
|
||||
|
||||
fun newInstance(path: String, showHidden: Boolean): SelectFolderDialog {
|
||||
fun newInstance(path: String, showHidden: Boolean, showFullPath: Boolean): SelectFolderDialog {
|
||||
mPath = path
|
||||
mFirstUpdate = true
|
||||
mShowHidden = showHidden
|
||||
mShowFullPath = showFullPath
|
||||
return SelectFolderDialog()
|
||||
}
|
||||
}
|
||||
@ -61,7 +63,7 @@ class SelectFolderDialog : DialogFragment(), Breadcrumbs.BreadcrumbsListener {
|
||||
|
||||
val adapter = ItemsAdapter(context, items)
|
||||
dialog.directory_picker_list.adapter = adapter
|
||||
dialog.directory_picker_breadcrumbs.setInitialBreadcrumb(mPath)
|
||||
dialog.directory_picker_breadcrumbs.setInitialBreadcrumb(mPath, mShowFullPath)
|
||||
dialog.directory_picker_list.setOnItemClickListener { adapterView, view, position, id ->
|
||||
val item = items[position]
|
||||
if (item.isDirectory) {
|
||||
|
@ -96,8 +96,7 @@ class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context,
|
||||
setMeasuredDimension(parentWidth, calculatedHeight)
|
||||
}
|
||||
|
||||
fun setInitialBreadcrumb(fullPath: String) {
|
||||
val showFullPath = false//Config.newInstance(context).showFullPath
|
||||
fun setInitialBreadcrumb(fullPath: String, showFullPath: Boolean) {
|
||||
val basePath = Environment.getExternalStorageDirectory().toString()
|
||||
var tempPath = fullPath
|
||||
var currPath = basePath
|
||||
|
Reference in New Issue
Block a user