From 349cc04e99d4866e2a7d4f53184c33dc1e110481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 17 Jan 2024 17:36:19 +0900 Subject: [PATCH] =?UTF-8?q?backStack=E3=81=AB=E8=BF=BD=E5=8A=A0=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/example/childguard/MainActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/example/childguard/MainActivity.java b/app/src/main/java/com/example/childguard/MainActivity.java index 003561a..76311cf 100644 --- a/app/src/main/java/com/example/childguard/MainActivity.java +++ b/app/src/main/java/com/example/childguard/MainActivity.java @@ -117,10 +117,12 @@ public class MainActivity extends AppCompatActivity { } else if (v.getItemId() == findViewById(R.id.navigation_notification).getId()) { getSupportFragmentManager().beginTransaction() .replace(findViewById(R.id.fragmentContainerView).getId(), NotificationFragment.newInstance("test", "test")) + .addToBackStack(null) .commit(); } else if (v.getItemId() == findViewById(R.id.navigation_settings).getId()) { getSupportFragmentManager().beginTransaction() .replace(findViewById(R.id.fragmentContainerView).getId(), SettingFragment.newInstance()) + .addToBackStack(null) .commit(); } return true;