diff --git a/app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java b/app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java index 30a4caa..0106d59 100644 --- a/app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java +++ b/app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java @@ -33,7 +33,7 @@ public class RouteDetailFragment extends Fragment { this.route = getArguments().getParcelable("route"); } - this.routeDetailText = view.findViewById(R.id.routeDetailText); + this.routeDetailText = view.findViewById(R.id.reoute_detail_tekst); this.routeDetailText.setText(this.route.getName()); this.imageButton = view.findViewById(R.id.route_detail_back_button); diff --git a/app/src/main/java/com/a1/nextlocation/fragments/StatisticFragment.java b/app/src/main/java/com/a1/nextlocation/fragments/StatisticFragment.java index e63a74d..707b719 100644 --- a/app/src/main/java/com/a1/nextlocation/fragments/StatisticFragment.java +++ b/app/src/main/java/com/a1/nextlocation/fragments/StatisticFragment.java @@ -25,6 +25,7 @@ public class StatisticFragment extends Fragment { private List couponList; private ImageView imageButton; + private ImageView couponButton; @Override @@ -48,6 +49,12 @@ public class StatisticFragment extends Fragment { ((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(); diff --git a/app/src/main/res/layout-land/fragment_route_detail.xml b/app/src/main/res/layout-land/fragment_route_detail.xml index e13fce8..48263eb 100644 --- a/app/src/main/res/layout-land/fragment_route_detail.xml +++ b/app/src/main/res/layout-land/fragment_route_detail.xml @@ -15,9 +15,9 @@ android:text="@string/start_route" android:textColor="@color/buttonColour" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="@+id/routeDetailText" - app:layout_constraintStart_toStartOf="@+id/routeDetailText" - app:layout_constraintTop_toBottomOf="@+id/routeDetailText" + app:layout_constraintEnd_toEndOf="@+id/reoute_detail_tekst" + app:layout_constraintStart_toStartOf="@+id/reoute_detail_tekst" + app:layout_constraintTop_toBottomOf="@+id/reoute_detail_tekst" app:layout_constraintVertical_bias="0.873" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_route.xml b/app/src/main/res/layout/fragment_route.xml index e7f4abc..f68174e 100644 --- a/app/src/main/res/layout/fragment_route.xml +++ b/app/src/main/res/layout/fragment_route.xml @@ -13,7 +13,7 @@ android:layout_height="wrap_content" android:layout_margin="10dp" android:background="@drawable/ic_back_button_24" - android:text="Back" + android:text="@string/terug" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/fragment_route_detail.xml b/app/src/main/res/layout/fragment_route_detail.xml index bd1d939..e365bd9 100644 --- a/app/src/main/res/layout/fragment_route_detail.xml +++ b/app/src/main/res/layout/fragment_route_detail.xml @@ -23,7 +23,7 @@ android:layout_height="wrap_content" android:text="@string/titel" android:textSize="20sp" - app:layout_constraintBottom_toTopOf="@+id/routeDetailImage" + app:layout_constraintBottom_toTopOf="@+id/route_detail_image" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -32,16 +32,16 @@ android:layout_width="250dp" android:layout_height="250dp" android:layout_margin="40dp" - android:id="@+id/routeDetailImage" + android:id="@+id/route_detail_image" app:layout_constraintTop_toBottomOf="@id/route_detail_back_button" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toTopOf="@id/routeDetailText" + app:layout_constraintBottom_toTopOf="@id/reoute_detail_tekst" /> + app:layout_constraintTop_toBottomOf="@id/route_detail_image" />