From 192f1a4c6415b0efbc90ddb1fa21bf9d05dbce66 Mon Sep 17 00:00:00 2001 From: sebas Date: Wed, 6 Jan 2021 13:22:37 +0100 Subject: [PATCH] Route detail fragment now fills in the right name and text --- .../com/a1/nextlocation/fragments/RouteDetailFragment.java | 6 +++++- app/src/main/res/layout-land/fragment_route_detail.xml | 3 ++- app/src/main/res/layout/fragment_route_detail.xml | 3 ++- 3 files changed, 9 insertions(+), 3 deletions(-) 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 0106d59..b7c5067 100644 --- a/app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java +++ b/app/src/main/java/com/a1/nextlocation/fragments/RouteDetailFragment.java @@ -18,6 +18,7 @@ public class RouteDetailFragment extends Fragment { private Route route; private TextView routeDetailText; + private TextView routeName; private ImageButton imageButton; @Override @@ -33,8 +34,11 @@ public class RouteDetailFragment extends Fragment { this.route = getArguments().getParcelable("route"); } + this.routeName = view.findViewById(R.id.route_title); + this.routeName.setText(this.route.getName()); + this.routeDetailText = view.findViewById(R.id.reoute_detail_tekst); - this.routeDetailText.setText(this.route.getName()); + this.routeDetailText.setText(this.route.getDescription()); this.imageButton = view.findViewById(R.id.route_detail_back_button); this.imageButton.setOnClickListener(v -> { 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 48263eb..3fe3a2d 100644 --- a/app/src/main/res/layout-land/fragment_route_detail.xml +++ b/app/src/main/res/layout-land/fragment_route_detail.xml @@ -38,7 +38,8 @@ android:layout_height="wrap_content" android:layout_marginEnd="250dp" android:text="titel" - android:textSize="20sp" + android:textColor="@color/white" + android:textSize="30sp" app:layout_constraintBottom_toTopOf="@+id/route_detail_image" app:layout_constraintEnd_toStartOf="@+id/reoute_detail_tekst" app:layout_constraintStart_toEndOf="@id/routeDetailBackButton" diff --git a/app/src/main/res/layout/fragment_route_detail.xml b/app/src/main/res/layout/fragment_route_detail.xml index e365bd9..6431efa 100644 --- a/app/src/main/res/layout/fragment_route_detail.xml +++ b/app/src/main/res/layout/fragment_route_detail.xml @@ -22,7 +22,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/titel" - android:textSize="20sp" + android:textColor="@color/white" + android:textSize="30sp" app:layout_constraintBottom_toTopOf="@+id/route_detail_image" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"