Merge branch 'RecyclerView' into follow-route

# Conflicts:
#	app/src/main/assets/locations.json
#	app/src/main/assets/routes.json
#	app/src/main/java/com/a1/nextlocation/fragments/LocationDetailFragment.java
#	app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java
#	app/src/main/res/values/strings.xml
This commit is contained in:
RemoMeijer
2021-01-06 13:20:52 +01:00
44 changed files with 233 additions and 115 deletions

View File

@@ -26,6 +26,7 @@ public class StatisticFragment extends Fragment {
private List<Coupon> couponList;
private ImageView imageButton;
private ImageView couponButton;
@Override
@@ -50,6 +51,18 @@ public class StatisticFragment extends Fragment {
couponNumber.setText(String.valueOf(adapter.getItemCount()));
this.imageButton = view.findViewById(R.id.statistics_back_button);
this.imageButton.setOnClickListener(v -> {
HomeFragment homeFragment = new HomeFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, homeFragment).addToBackStack(null).commit();
});
this.couponButton = view.findViewById(R.id.coupon_button);
this.couponButton.setOnClickListener(v -> {
CouponFragment couponFragment = new CouponFragment();
((FragmentActivity) view.getContext()).getSupportFragmentManager().beginTransaction().replace(R.id.fragment_layout, couponFragment).addToBackStack(null).commit();
});
ConstraintLayout constraintLayout = view.findViewById(R.id.Box4);
constraintLayout.setOnClickListener(v -> {
CouponFragment couponFragment = new CouponFragment();