メニューアイテムのイベント実装(テスト)

This commit is contained in:
r-ca 2024-01-29 00:28:03 +09:00
parent 0d5c3c4337
commit d794bb97b6
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -22,6 +22,7 @@ import com.google.android.material.textfield.TextInputLayout;
import javax.inject.Inject; import javax.inject.Inject;
import dagger.hilt.android.AndroidEntryPoint; import dagger.hilt.android.AndroidEntryPoint;
import one.nem.lacerta.component.common.LacertaApplyTagDialog;
import one.nem.lacerta.component.common.picker.LacertaFilePickerDialog; import one.nem.lacerta.component.common.picker.LacertaFilePickerDialog;
import one.nem.lacerta.data.Document; import one.nem.lacerta.data.Document;
import one.nem.lacerta.data.LacertaLibrary; import one.nem.lacerta.data.LacertaLibrary;
@ -187,6 +188,9 @@ public class ViewerContainerFragment extends Fragment {
} else if (item.getItemId() == R.id.action_combine) { } else if (item.getItemId() == R.id.action_combine) {
combineDocument(); combineDocument();
return true; return true;
} else if (item.getItemId() == R.id.action_apply_tag) {
applyTag();
return true;
} else { } else {
return false; return false;
} }
@ -194,6 +198,16 @@ public class ViewerContainerFragment extends Fragment {
}); });
} }
private void applyTag() {
LacertaApplyTagDialog lacertaApplyTagDialog = new LacertaApplyTagDialog();
lacertaApplyTagDialog
.setTitle("タグの適用")
.setMessage("タグを適用するファイルを選択してください")
.setNegativeButtonText("キャンセル")
.setDocumentId(documentId)
.show(getChildFragmentManager(), "LacertaApplyTagDialog");
}
private void combineDocument() { private void combineDocument() {
LacertaFilePickerDialog lacertaFilePickerDialog = new LacertaFilePickerDialog(); LacertaFilePickerDialog lacertaFilePickerDialog = new LacertaFilePickerDialog();
lacertaFilePickerDialog.setListener((fileName, selectedId) -> { lacertaFilePickerDialog.setListener((fileName, selectedId) -> {