<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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/coordinator_licenses"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?attr/colorSurface">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appbar_drivers"
        style="@style/Widget.Eden.TransparentTopAppBarLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true"
        android:touchscreenBlocksFocus="false"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"

        app:liftOnScrollTargetViewId="@id/list_drivers">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/toolbar_drivers"
            style="@style/Widget.Eden.TransparentTopToolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:touchscreenBlocksFocus="false"
            app:navigationIcon="@drawable/ic_back"
            app:title="@string/gpu_driver_fetcher" />

    </com.google.android.material.appbar.AppBarLayout>

    <TextView
        android:id="@+id/label_gpu_model"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:padding="8dp"
        android:text="@string/gpu_model"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/appbar_drivers" />

    <TextView
        android:id="@+id/badge_gpu_model"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:background="@drawable/item_release_latest_badge_background"
        android:textColor="?attr/colorPrimary"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="@id/label_gpu_model"
        app:layout_constraintStart_toEndOf="@id/label_gpu_model"
        app:layout_constraintTop_toTopOf="@id/label_gpu_model" />

    <TextView
        android:id="@+id/label_recommended_driver"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:padding="8dp"
        android:text="@string/recommended_driver"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/label_gpu_model" />

    <TextView
        android:id="@+id/badge_recommended_driver"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:background="@drawable/item_release_latest_badge_background"
        android:textColor="?attr/colorPrimary"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="@id/label_recommended_driver"
        app:layout_constraintStart_toEndOf="@id/label_recommended_driver"
        app:layout_constraintTop_toTopOf="@id/label_recommended_driver" />

    <View
        android:id="@+id/divider"
        android:layout_width="0dp"
        android:layout_height="1dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="16dp"
        android:background="?attr/colorOutline"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/label_recommended_driver" />

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/list_drivers"
        android:layout_height="0dp"
        android:layout_width="match_parent"
        android:layout_marginTop="8dp"
        android:clipToPadding="false"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"
        app:layout_constraintTop_toBottomOf="@id/divider"
        app:layout_constraintBottom_toBottomOf="parent" />

    <ProgressBar
        android:id="@+id/loadingIndicator"
        style="?android:attr/progressBarStyle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:visibility="invisible"
        app:layout_constraintEnd_toEndOf="@id/list_drivers"
        app:layout_constraintStart_toStartOf="@id/list_drivers"
        app:layout_constraintTop_toTopOf="@id/list_drivers" />

</androidx.constraintlayout.widget.ConstraintLayout>
