Small fix

This commit is contained in:
RemoMeijer
2021-01-05 13:23:48 +01:00
parent aae67f53ec
commit fbf8cbe1c5
3 changed files with 16 additions and 19 deletions

View File

@@ -41,8 +41,8 @@ public class StatisticFragment extends Fragment {
TextView couponNumber = view.findViewById(R.id.couponAmount);
couponNumber.setText(String.valueOf(adapter.getItemCount()));
this.imageButton = view.findViewById(R.id.route_back_button);
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();

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/primaryColour"
tools:context=".fragments.StatisticFragment">
@@ -23,12 +23,12 @@
android:id="@+id/name_box"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toTopOf="@id/Box2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/textView"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
@@ -51,8 +51,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:layout_width="wrap_content"
@@ -125,8 +124,7 @@
app:layout_constraintBottom_toTopOf="@id/Box4"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box2"
>
app:layout_constraintTop_toBottomOf="@id/Box2">
<TextView
android:layout_width="wrap_content"
@@ -167,12 +165,12 @@
android:id="@+id/Box4"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginHorizontal="20dp"
android:background="@color/secondaryColour"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/Box3"
android:background="@color/secondaryColour"
android:layout_marginHorizontal="20dp"
>
@@ -195,13 +193,12 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/couponAmount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/couponAmount"
android:text="@string/getal"
android:textColor="@color/black"
android:textSize="20sp"
@@ -213,11 +210,11 @@
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageButton
android:id="@+id/imageButton"
android:id="@+id/statistics_back_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="15dp"
android:layout_marginTop="10dp"
android:background="@drawable/ic_back_button_24"
android:backgroundTint="@color/buttonColour"
android:src="@drawable/ic_back_button_24"

View File

@@ -18,13 +18,13 @@
android:id="@+id/location_name"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="294dp"
android:layout_marginEnd="240dp"
android:gravity="center"
android:text="@string/locaties"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
</androidx.constraintlayout.widget.ConstraintLayout>