From d9ab6d6095fcf36aed450ed07d1e97e1a8348f71 Mon Sep 17 00:00:00 2001 From: it232115 Date: Tue, 16 Jan 2024 10:53:10 +0900 Subject: [PATCH] =?UTF-8?q?=E8=BB=BD=E5=BE=AE=E3=81=AA=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/example/childguard/HomeFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/example/childguard/HomeFragment.java b/app/src/main/java/com/example/childguard/HomeFragment.java index 0446eb4..b7c8ce0 100644 --- a/app/src/main/java/com/example/childguard/HomeFragment.java +++ b/app/src/main/java/com/example/childguard/HomeFragment.java @@ -98,7 +98,7 @@ public class HomeFragment extends Fragment { Button parent = view.findViewById(R.id.QRprinting); Button born = view.findViewById(R.id.QRprinting); //falseのときにFirebaseへの登録 - if (!alreadySaved) { + if (alreadySaved) { Log.d("HomeFragment", "already printed"); //画面遷移&ID受け渡し Toast.makeText(getActivity(),"再印刷",Toast.LENGTH_SHORT).show(); @@ -127,7 +127,7 @@ public class HomeFragment extends Fragment { Log.d(TAG, "DocumentSnapshot added with ID: " + documentReference.getId()); SharedPreferences.Editor e = preferences.edit(); // キー"alreadySaved"の値をtrueにする - e.putBoolean("alreadySaved", false); + e.putBoolean("alreadySaved", true); //確定処理 e.apply(); //画面遷移&ID受け渡し