From 066ba473f6fdc08744df829120659710e1617169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 16:47:23 +0900 Subject: [PATCH 1/2] =?UTF-8?q?UrlPageActivity=E3=82=92AndroidManifest?= =?UTF-8?q?=E3=81=AB=E6=98=8E=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/AndroidManifest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cbdd641..430b05a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -34,6 +34,7 @@ + \ No newline at end of file From f4cae51cdabeb6bf1ba9e367daf6bc9f6fc08709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 11 Jan 2024 16:51:15 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=82=B9=E3=82=AD=E3=83=A3=E3=83=B3?= =?UTF-8?q?=E7=B5=90=E6=9E=9C=E3=82=92=E3=83=88=E3=83=BC=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB,=20=E4=BD=9C?= =?UTF-8?q?=E3=82=8A=E3=81=8B=E3=81=91=E3=81=AE=E6=A9=9F=E8=83=BD=E3=82=92?= =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=A2=E3=82=A6=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/childguard/QRFragment.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/example/childguard/QRFragment.java b/app/src/main/java/com/example/childguard/QRFragment.java index b028e3e..71b0f96 100644 --- a/app/src/main/java/com/example/childguard/QRFragment.java +++ b/app/src/main/java/com/example/childguard/QRFragment.java @@ -27,7 +27,7 @@ import com.journeyapps.barcodescanner.ScanOptions; */ public class QRFragment extends Fragment { //QRコードから受け取ったURLの受け渡しの宣言 - OnDataPass dataPass; +// OnDataPass dataPass; // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; @@ -71,17 +71,18 @@ public class QRFragment extends Fragment { } //FragmentからActivityへデータの受け渡しをするためのInterface - public interface OnDataPass{ - void onDataPass(String urlPass); - } +// public interface OnDataPass{ +// void onDataPass(String urlPass); +// } private final ActivityResultLauncher fragmentLauncher = registerForActivityResult(new ScanContract(), result -> { //QRコードからデータを読み取れたかの確認 if(result.getContents() == null) { Toast.makeText(getContext(), "Cancelled from fragment", Toast.LENGTH_LONG).show(); } else { - dataPass.onDataPass(result.getContents()); +// dataPass.onDataPass(result.getContents()); //画面遷移 + Toast.makeText(getContext(), result.getContents(), Toast.LENGTH_SHORT).show(); Intent intent=new Intent(getActivity(),UrlPageActivity.class); startActivity(intent); }