イベントを受け取るように WIP

This commit is contained in:
r-ca 2024-01-27 16:17:09 +09:00
parent 542c04b908
commit 78d4345313
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -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) {