From 78d4345313daa370914ba9c9b850fb5b0f05b33a Mon Sep 17 00:00:00 2001 From: r-ca Date: Sat, 27 Jan 2024 16:17:09 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A4=E3=83=99=E3=83=B3=E3=83=88=E3=82=92?= =?UTF-8?q?=E5=8F=97=E3=81=91=E5=8F=96=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/viewer/ViewerListFragment.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerListFragment.java b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerListFragment.java index 269e9193..6f51a995 100644 --- a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerListFragment.java +++ b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerListFragment.java @@ -22,6 +22,7 @@ import dagger.hilt.android.AndroidEntryPoint; import one.nem.lacerta.component.common.LacertaSelectDirDialog; import one.nem.lacerta.component.common.LacertaSelectDirDialogListener; import one.nem.lacerta.component.common.LacertaSelectRevDialog; +import one.nem.lacerta.component.common.LacertaSelectRevDialogListener; import one.nem.lacerta.data.Document; import one.nem.lacerta.data.LacertaLibrary; import one.nem.lacerta.model.ListItemType; @@ -182,6 +183,20 @@ public class ViewerListFragment extends Fragment { // .commit(); LacertaSelectRevDialog lacertaSelectRevDialog = new LacertaSelectRevDialog(); + lacertaSelectRevDialog.setDocumentId(this.documentId); + lacertaSelectRevDialog.setListener(new LacertaSelectRevDialogListener() { + @Override + public void onItemSelected(String revId) { + // Do something + Toast.makeText(getContext(), "Selected revId: " + revId, Toast.LENGTH_SHORT).show(); + } + + @Override + public void onDialogCanceled() { + // Do something + Toast.makeText(getContext(), "Canceled", Toast.LENGTH_SHORT).show(); + } + }); lacertaSelectRevDialog.show(getParentFragmentManager(), "select_rev_dialog"); return true; } else if (item.getItemId() == R.id.action_rename) {