Route detail fragment now fills in the right name and text
This commit is contained in:
@@ -18,6 +18,7 @@ public class RouteDetailFragment extends Fragment {
|
|||||||
|
|
||||||
private Route route;
|
private Route route;
|
||||||
private TextView routeDetailText;
|
private TextView routeDetailText;
|
||||||
|
private TextView routeName;
|
||||||
private ImageButton imageButton;
|
private ImageButton imageButton;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -33,8 +34,11 @@ public class RouteDetailFragment extends Fragment {
|
|||||||
this.route = getArguments().getParcelable("route");
|
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 = 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 = view.findViewById(R.id.route_detail_back_button);
|
||||||
this.imageButton.setOnClickListener(v -> {
|
this.imageButton.setOnClickListener(v -> {
|
||||||
|
|||||||
@@ -38,7 +38,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="250dp"
|
android:layout_marginEnd="250dp"
|
||||||
android:text="titel"
|
android:text="titel"
|
||||||
android:textSize="20sp"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="30sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
|
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/reoute_detail_tekst"
|
app:layout_constraintEnd_toStartOf="@+id/reoute_detail_tekst"
|
||||||
app:layout_constraintStart_toEndOf="@id/routeDetailBackButton"
|
app:layout_constraintStart_toEndOf="@id/routeDetailBackButton"
|
||||||
|
|||||||
@@ -22,7 +22,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/titel"
|
android:text="@string/titel"
|
||||||
android:textSize="20sp"
|
android:textColor="@color/white"
|
||||||
|
android:textSize="30sp"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
|
app:layout_constraintBottom_toTopOf="@+id/route_detail_image"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|||||||
Reference in New Issue
Block a user