<?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"
    style="?attr/cardStyle"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="5dp"
    android:layout_marginTop="4dp"
    android:layout_marginEnd="5dp"
    android:layout_marginBottom="4dp"
    android:foreground="?android:attr/selectableItemBackground"
    app:cardCornerRadius="@dimen/card_corner_radius"
    app:cardElevation="@dimen/card_elevation">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingTop="12dp"
        android:paddingBottom="12dp">

        <ImageView
            android:id="@+id/status_icon"
            android:layout_width="25dp"
            android:layout_height="25dp"
            android:layout_marginStart="16dp"
            android:layout_marginEnd="16dp"
            android:visibility="invisible"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/status"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />


        <ProgressBar
            android:id="@+id/progress"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="visible"
            app:layout_constraintBottom_toBottomOf="@+id/status_icon"
            app:layout_constraintEnd_toEndOf="@+id/status_icon"
            app:layout_constraintStart_toStartOf="@+id/status_icon"
            app:layout_constraintTop_toTopOf="@+id/status_icon" />

        <TextView
            android:id="@+id/status"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:maxLines="1"
            android:paddingTop="3dp"
            android:paddingBottom="3dp"
            android:text="@string/checking_for_updates"
            android:textAppearance="?android:attr/textAppearanceMedium"
            app:autoSizeMinTextSize="1sp"
            app:autoSizeTextType="uniform"
            app:layout_constraintEnd_toStartOf="@+id/install"
            app:layout_constraintStart_toEndOf="@+id/status_icon"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/current_version"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:maxLines="1"
            android:text="@string/checking_for_updates"
            app:autoSizeMinTextSize="1sp"
            app:autoSizeTextType="uniform"
            app:layout_constraintEnd_toEndOf="@+id/status"
            app:layout_constraintStart_toStartOf="@+id/status"
            app:layout_constraintTop_toBottomOf="@+id/status" />

        <TextView
            android:id="@+id/latest_version"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:maxLines="1"
            android:text="@string/checking_for_updates"
            app:autoSizeMinTextSize="1sp"
            app:autoSizeTextType="uniform"
            app:layout_constraintEnd_toEndOf="@+id/status"
            app:layout_constraintStart_toStartOf="@+id/status"
            app:layout_constraintTop_toBottomOf="@+id/current_version" />

        <TextView
            android:id="@+id/additional"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:maxLines="1"
            app:autoSizeMinTextSize="1sp"
            app:autoSizeTextType="uniform"
            app:layout_constraintEnd_toEndOf="@+id/status"
            app:layout_constraintStart_toStartOf="@+id/status"
            app:layout_constraintTop_toBottomOf="@+id/latest_version" />

        <Button
            android:id="@+id/install"
            android:layout_width="90dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:maxLines="1"
            android:text="@string/install"
            app:autoSizeMaxTextSize="14sp"
            app:autoSizeTextType="uniform"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.cardview.widget.CardView>