<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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:id="@+id/favourite_card"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="4dp"
    android:foreground="?android:attr/selectableItemBackground"
    tools:layout_editor_absoluteX="8dp"
    tools:layout_editor_absoluteY="128dp">

    <View
        android:id="@+id/selected_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorAccent"
        android:visibility="invisible" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/favourite_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="21dp"
            android:text=""
            android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
            app:layout_constraintStart_toStartOf="@+id/favourite_time"
            app:layout_constraintTop_toTopOf="parent"
            tools:layout_editor_absoluteX="16dp"
            tools:layout_editor_absoluteY="21dp" />

        <TextView
            android:id="@+id/favourite_time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:text="@string/loading"
            android:textAppearance="@style/TextAppearance.AppCompat.Headline"
            app:layout_constraintStart_toStartOf="@+id/favourite_line"
            app:layout_constraintTop_toBottomOf="@+id/favourite_name" />

        <TextView
            android:id="@+id/favourite_line"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="16dp"
            android:ellipsize="end"
            android:text=""
            android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/ticketMachineIcon"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/favourite_time" />

        <ImageView
            android:id="@+id/departureTypeIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="8dp"
            android:contentDescription="@string/departure_type_icon_description"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent" />

        <ImageView
            android:id="@+id/departureFloorIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="8dp"
            android:contentDescription="@string/departure_floor"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/departureTypeIcon"
            app:srcCompat="@drawable/ic_low_floor" />

        <ImageView
            android:id="@+id/ticketMachineIcon"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginBottom="8dp"
            android:contentDescription="@string/ticket_machine_icon"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/departureFloorIcon" />

        <ImageView
            android:id="@+id/favourite_more_button"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginTop="8dp"
            android:layout_marginEnd="8dp"
            android:contentDescription="@string/favourite_row_more_button"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:srcCompat="@drawable/ic_more" />
    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>