mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
メニューアイテムのイベント実装(テスト)
This commit is contained in:
parent
0d5c3c4337
commit
d794bb97b6
|
@ -22,6 +22,7 @@ import com.google.android.material.textfield.TextInputLayout;
|
|||
import javax.inject.Inject;
|
||||
|
||||
import dagger.hilt.android.AndroidEntryPoint;
|
||||
import one.nem.lacerta.component.common.LacertaApplyTagDialog;
|
||||
import one.nem.lacerta.component.common.picker.LacertaFilePickerDialog;
|
||||
import one.nem.lacerta.data.Document;
|
||||
import one.nem.lacerta.data.LacertaLibrary;
|
||||
|
@ -187,6 +188,9 @@ public class ViewerContainerFragment extends Fragment {
|
|||
} else if (item.getItemId() == R.id.action_combine) {
|
||||
combineDocument();
|
||||
return true;
|
||||
} else if (item.getItemId() == R.id.action_apply_tag) {
|
||||
applyTag();
|
||||
return true;
|
||||
} else {
|
||||
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() {
|
||||
LacertaFilePickerDialog lacertaFilePickerDialog = new LacertaFilePickerDialog();
|
||||
lacertaFilePickerDialog.setListener((fileName, selectedId) -> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user