From b8caf9abf468e450636535e84c3ad3a350741e11 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 18:24:29 +0900 Subject: [PATCH] =?UTF-8?q?HomeFragment=E3=81=AB=E6=88=BB=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E5=8E=9F=E5=9B=A0=E3=82=92=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?,=20SettingFragment=E3=81=A7=E3=81=AFFab=E3=82=92=E9=9A=A0?= =?UTF-8?q?=E3=81=99=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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/example/childguard/MainActivity.java b/app/src/main/java/com/example/childguard/MainActivity.java index 76311cf..71f4007 100644 --- a/app/src/main/java/com/example/childguard/MainActivity.java +++ b/app/src/main/java/com/example/childguard/MainActivity.java @@ -110,16 +110,19 @@ public class MainActivity extends AppCompatActivity { { if (v.getItemId() == findViewById(R.id.navigation_home).getId()) { + findViewById(R.id.fab_scan_qr_code).setVisibility(FrameLayout.VISIBLE); getSupportFragmentManager().beginTransaction() .replace(findViewById(R.id.fragmentContainerView).getId(), this.homeFragment) .addToBackStack(null) .commit(); } else if (v.getItemId() == findViewById(R.id.navigation_notification).getId()) { + findViewById(R.id.fab_scan_qr_code).setVisibility(FrameLayout.VISIBLE); 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()) { + findViewById(R.id.fab_scan_qr_code).setVisibility(FrameLayout.GONE); getSupportFragmentManager().beginTransaction() .replace(findViewById(R.id.fragmentContainerView).getId(), SettingFragment.newInstance()) .addToBackStack(null) @@ -203,9 +206,6 @@ public class MainActivity extends AppCompatActivity { E.apply(); } - HomeFragment fragment = new HomeFragment(); - getSupportFragmentManager().beginTransaction().replace(R.id.fragmentContainerView, fragment).commit(); - homeFragment.onEvent(!isInCar); } }