From 39e9336de0bef9db2299b7e18c8f95a3caf5610a Mon Sep 17 00:00:00 2001 From: it232115 Date: Mon, 22 Jan 2024 22:06:37 +0900 Subject: [PATCH] =?UTF-8?q?=E5=90=84=E7=A8=AE=E3=83=90=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20=E9=80=9A=E7=9F=A5=E3=81=AE=E3=83=AA?= =?UTF-8?q?=E3=82=B9=E3=83=88=E5=8C=96=E6=98=A8=E6=97=A5=E3=81=AE=E6=96=AD?= =?UTF-8?q?=E5=BF=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/childguard/HomeFragment.java | 2 ++ .../main/java/com/example/childguard/MainActivity.java | 8 ++------ app/src/main/res/menu/bottom_menu.xml | 5 +---- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/com/example/childguard/HomeFragment.java b/app/src/main/java/com/example/childguard/HomeFragment.java index d3e093b..e95ce6d 100644 --- a/app/src/main/java/com/example/childguard/HomeFragment.java +++ b/app/src/main/java/com/example/childguard/HomeFragment.java @@ -1,5 +1,6 @@ package com.example.childguard; +import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.util.Log; @@ -62,6 +63,7 @@ public class HomeFragment extends Fragment implements OnEventListener{ mParam2 = getArguments().getString(ARG_PARAM2); } + } @Override diff --git a/app/src/main/java/com/example/childguard/MainActivity.java b/app/src/main/java/com/example/childguard/MainActivity.java index 5f1cdef..02d2ce8 100644 --- a/app/src/main/java/com/example/childguard/MainActivity.java +++ b/app/src/main/java/com/example/childguard/MainActivity.java @@ -94,12 +94,7 @@ public class MainActivity extends AppCompatActivity { .commit(); firebaselink(); - } 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() @@ -107,6 +102,7 @@ public class MainActivity extends AppCompatActivity { .addToBackStack(null) .commit(); } + firebaselink(); return true; }); diff --git a/app/src/main/res/menu/bottom_menu.xml b/app/src/main/res/menu/bottom_menu.xml index c3e8d9a..0d0305f 100644 --- a/app/src/main/res/menu/bottom_menu.xml +++ b/app/src/main/res/menu/bottom_menu.xml @@ -4,10 +4,7 @@ android:id="@+id/navigation_home" android:icon="@drawable/ic_home_black_24dp" android:title="home"/> - +