updatePathTextViewをBase側に追加

This commit is contained in:
r-ca 2024-01-28 10:36:30 +09:00
parent 8a656f673d
commit 41776b360b
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -1,10 +1,13 @@
package one.nem.lacerta.component.common.picker.base; package one.nem.lacerta.component.common.picker.base;
import android.widget.TextView;
import androidx.fragment.app.DialogFragment; import androidx.fragment.app.DialogFragment;
import javax.inject.Inject; import javax.inject.Inject;
import one.nem.lacerta.model.LibraryItemPage; import one.nem.lacerta.model.LibraryItemPage;
import one.nem.lacerta.model.PublicPath;
import one.nem.lacerta.utils.LacertaLogger; import one.nem.lacerta.utils.LacertaLogger;
public class LacertaFilePickerDialogBase extends DialogFragment { public class LacertaFilePickerDialogBase extends DialogFragment {
@ -39,6 +42,14 @@ public class LacertaFilePickerDialogBase extends DialogFragment {
} }
// Methods // 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) { protected void updateListView(LacertaFilePickerAdapterBase adapter, LibraryItemPage libraryItemPage, int currentCount, String currentDirId) {
if (currentDirId == null) { if (currentDirId == null) {
// Rootが関わる推移 (Rootからの推移) // Rootが関わる推移 (Rootからの推移)