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 77d9d32..e63a74d 100644 --- a/app/src/main/java/com/a1/nextlocation/fragments/StatisticFragment.java +++ b/app/src/main/java/com/a1/nextlocation/fragments/StatisticFragment.java @@ -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(); diff --git a/app/src/main/res/layout/fragment_statistic.xml b/app/src/main/res/layout/fragment_statistic.xml index 0bc2015..0e63e8e 100644 --- a/app/src/main/res/layout/fragment_statistic.xml +++ b/app/src/main/res/layout/fragment_statistic.xml @@ -1,9 +1,9 @@ @@ -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" /> + app:layout_constraintTop_toBottomOf="@id/Box2"> @@ -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" /> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" /> \ No newline at end of file