From 6ec0710bac0b2c1d15e5276aee995147fd119bb6 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 28 Jan 2024 12:51:38 +0900 Subject: [PATCH] =?UTF-8?q?=E5=BC=95=E6=95=B0=E5=87=A6=E7=90=86=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/viewer/ViewerContainerFragment.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java index fa914cf9..2f4ae1f3 100644 --- a/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java +++ b/component/viewer/src/main/java/one/nem/lacerta/component/viewer/ViewerContainerFragment.java @@ -15,20 +15,30 @@ import android.view.ViewGroup; */ public class ViewerContainerFragment extends Fragment { + // Variables + private String documentId; + private String documentName; + public ViewerContainerFragment() { // Required empty public constructor } - public static ViewerContainerFragment newInstance() { + public static ViewerContainerFragment newInstance(String documentId, String documentName) { ViewerContainerFragment fragment = new ViewerContainerFragment(); Bundle args = new Bundle(); fragment.setArguments(args); + args.putString("documentId", documentId); + args.putString("documentName", documentName); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + if (getArguments() != null){ + documentId = getArguments().getString("documentId"); + documentName = getArguments().getString("documentName"); + } } @Override