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"/> - +