Route detail fragment now fills in the right name and text

This commit is contained in:
sebas
2021-01-06 13:22:37 +01:00
parent 09ced99654
commit 192f1a4c64
3 changed files with 9 additions and 3 deletions

View File

@@ -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 -> {

View File

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

View File

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