From 678b179e04369521fd82174f9b815324de34408a Mon Sep 17 00:00:00 2001 From: RemoMeijer Date: Mon, 4 Jan 2021 15:46:18 +0100 Subject: [PATCH] added backbutton --- .../a1/nextlocation/fragments/LocationFragment.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/a1/nextlocation/fragments/LocationFragment.java b/app/src/main/java/com/a1/nextlocation/fragments/LocationFragment.java index 3a026d5..237622d 100644 --- a/app/src/main/java/com/a1/nextlocation/fragments/LocationFragment.java +++ b/app/src/main/java/com/a1/nextlocation/fragments/LocationFragment.java @@ -42,11 +42,11 @@ public class LocationFragment extends Fragment { this.locationRecyclerView.setHasFixedSize(true); this.layoutManager = new LinearLayoutManager(this.getContext()); -// this.imageButton = view.findViewById(R.id.locationBackButton); -// this.imageButton.setOnClickListener(v -> { -// HomeFragment homeFragment = new HomeFragment(); -// ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit(); -// }); + this.imageButton = view.findViewById(R.id.locationBackButton); + this.imageButton.setOnClickListener(v -> { + HomeFragment homeFragment = new HomeFragment(); + ((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit(); + }); LocationListManager.INSTANCE.setContext(this.getContext()); LocationListManager.INSTANCE.load();