From 41776b360b56dbedd2945a97dc920d36d65d5a0f Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 28 Jan 2024 10:36:30 +0900 Subject: [PATCH] =?UTF-8?q?updatePathTextView=E3=82=92Base=E5=81=B4?= =?UTF-8?q?=E3=81=AB=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../picker/base/LacertaFilePickerDialogBase.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java b/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java index 07ec1ee2..b765690a 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java @@ -1,10 +1,13 @@ package one.nem.lacerta.component.common.picker.base; +import android.widget.TextView; + import androidx.fragment.app.DialogFragment; import javax.inject.Inject; import one.nem.lacerta.model.LibraryItemPage; +import one.nem.lacerta.model.PublicPath; import one.nem.lacerta.utils.LacertaLogger; public class LacertaFilePickerDialogBase extends DialogFragment { @@ -39,6 +42,14 @@ public class LacertaFilePickerDialogBase extends DialogFragment { } // Methods + + protected void updatePathTextView(TextView currentDirTextView, PublicPath publicPath) { + if (publicPath == null) { + currentDirTextView.setText("/"); + } else { + currentDirTextView.setText("/" + publicPath.parent().getStringPath()); // TODO-rca: PublicPath側の実装を治すべき + } + } protected void updateListView(LacertaFilePickerAdapterBase adapter, LibraryItemPage libraryItemPage, int currentCount, String currentDirId) { if (currentDirId == null) { // Rootが関わる推移 (Rootからの推移)