Added coupon arrow

This commit is contained in:
RemoMeijer
2021-01-05 13:32:28 +01:00
parent fbf8cbe1c5
commit 2e5f57aa23
6 changed files with 37 additions and 18 deletions

View File

@@ -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);

View File

@@ -25,6 +25,7 @@ public class StatisticFragment extends Fragment {
private List<Coupon> 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();

View File

@@ -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" />
<ImageButton
@@ -39,13 +39,13 @@
android:layout_marginEnd="250dp"
android:text="titel"
android:textSize="20sp"
app:layout_constraintBottom_toTopOf="@+id/routeDetailImage"
app:layout_constraintEnd_toStartOf="@+id/routeDetailText"
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
app:layout_constraintEnd_toStartOf="@+id/reoute_detail_tekst"
app:layout_constraintStart_toEndOf="@id/routeDetailBackButton"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/routeDetailImage"
android:id="@+id/route_detail_image"
android:layout_width="250dp"
android:layout_height="250dp"
android:layout_marginEnd="350dp"
@@ -55,7 +55,7 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/routeDetailText"
android:id="@+id/reoute_detail_tekst"
android:layout_width="0dp"
android:layout_height="10dp"
android:layout_marginStart="50dp"
@@ -64,7 +64,7 @@
android:text=""
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/routeDetailImage"
app:layout_constraintStart_toEndOf="@id/route_detail_image"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

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

View File

@@ -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"
/>
<TextView
android:id="@+id/routeDetailText"
android:id="@+id/reoute_detail_tekst"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="20dp"
@@ -49,7 +49,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.6"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/routeDetailImage" />
app:layout_constraintTop_toBottomOf="@id/route_detail_image" />
<Button
android:id="@+id/start_route_button"
@@ -62,7 +62,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/routeDetailText"
app:layout_constraintTop_toBottomOf="@+id/reoute_detail_tekst"
app:layout_constraintVertical_bias="0.671" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -169,10 +169,10 @@
android:background="@color/secondaryColour"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.85"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box3"
>
app:layout_constraintTop_toBottomOf="@id/Box3">
<TextView
android:layout_width="wrap_content"
@@ -207,6 +207,18 @@
app:layout_constraintStart_toStartOf="@id/Balk4"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="@+id/coupon_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="20dp"
android:background="@drawable/ic_back_button_24"
android:scaleX="-1"
android:text="@string/terug"
app:layout_constraintBottom_toBottomOf="@+id/couponAmount"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/couponAmount" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageButton