From 2812b02ba2bdb4b9ec7e9e79f6710b44d0e76e23 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 28 Jan 2024 12:39:10 +0900 Subject: [PATCH] =?UTF-8?q?Factory=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/viewer/ViewerBodyFragment.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerBodyFragment.java b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerBodyFragment.java index 4809416a..5549adb0 100644 --- a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerBodyFragment.java +++ b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerBodyFragment.java @@ -36,13 +36,30 @@ public class ViewerBodyFragment extends Fragment { @Inject LacertaVcsFactory lacertaVcsFactory; + // Variables + private String documentId; + private String documentName; + private String revisionId; + public ViewerBodyFragment() { // Required empty public constructor } - public static ViewerBodyFragment newInstance() { + public static ViewerBodyFragment newInstance(String documentId, String documentName) { ViewerBodyFragment fragment = new ViewerBodyFragment(); Bundle args = new Bundle(); + args.putString("documentId", documentId); + args.putString("documentName", documentName); + fragment.setArguments(args); + return fragment; + } + + public static ViewerBodyFragment newInstance(String documentId, String documentName, String revisionId) { + ViewerBodyFragment fragment = new ViewerBodyFragment(); + Bundle args = new Bundle(); + args.putString("documentId", documentId); + args.putString("documentName", documentName); + args.putString("revisionId", revisionId); fragment.setArguments(args); return fragment; }