rename setInitialBreadcrumb to setBreadcrumb
This commit is contained in:
parent
a3277190e5
commit
d3567b0b95
3 changed files with 4 additions and 4 deletions
|
@ -78,7 +78,7 @@ public class MainActivity extends SimpleActivity implements ItemsFragment.ItemIn
|
|||
}
|
||||
|
||||
private void openPath(String path) {
|
||||
mBreadcrumbs.setInitialBreadcrumb(path, mConfig.getShowFullPath());
|
||||
mBreadcrumbs.setBreadcrumb(path, mConfig.getShowFullPath());
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.PATH, path);
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@ import java.util.*
|
|||
import kotlin.comparisons.compareBy
|
||||
|
||||
class SelectFolderDialog : DialogFragment(), Breadcrumbs.BreadcrumbsListener {
|
||||
val SELECT_FOLDER_PATH = "path"
|
||||
|
||||
companion object {
|
||||
lateinit var mPath: String
|
||||
var mFirstUpdate: Boolean = true
|
||||
var mShowHidden: Boolean = false
|
||||
var mShowFullPath: Boolean = false
|
||||
val SELECT_FOLDER_PATH = "path"
|
||||
|
||||
fun newInstance(path: String, showHidden: Boolean, showFullPath: Boolean): SelectFolderDialog {
|
||||
mPath = path
|
||||
|
@ -64,7 +64,7 @@ class SelectFolderDialog : DialogFragment(), Breadcrumbs.BreadcrumbsListener {
|
|||
|
||||
val adapter = ItemsAdapter(context, items)
|
||||
dialog.directory_picker_list.adapter = adapter
|
||||
dialog.directory_picker_breadcrumbs.setInitialBreadcrumb(mPath, mShowFullPath)
|
||||
dialog.directory_picker_breadcrumbs.setBreadcrumb(mPath, mShowFullPath)
|
||||
dialog.directory_picker_list.setOnItemClickListener { adapterView, view, position, id ->
|
||||
val item = items[position]
|
||||
if (item.isDirectory) {
|
||||
|
|
|
@ -96,7 +96,7 @@ class Breadcrumbs(context: Context, attrs: AttributeSet) : LinearLayout(context,
|
|||
setMeasuredDimension(parentWidth, calculatedHeight)
|
||||
}
|
||||
|
||||
fun setInitialBreadcrumb(fullPath: String, showFullPath: Boolean) {
|
||||
fun setBreadcrumb(fullPath: String, showFullPath: Boolean) {
|
||||
val basePath = Environment.getExternalStorageDirectory().toString()
|
||||
var tempPath = fullPath
|
||||
var currPath = basePath
|
||||
|
|
Loading…
Reference in a new issue