<?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:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:clickable="true"
    android:background="?attr/selectableItemBackground"
    android:focusable="true">

    <!-- Ignore ContentDescription because it is kind of meaningless to have TTS read out "App icon"
         when it will inevitably read out the name of the app straight after. -->
    <ImageView
        android:id="@+id/icon"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_width="48dp"
        android:layout_height="48dp"
        tools:src="@drawable/ic_launcher"
        android:scaleType="fitCenter"
        android:layout_marginStart="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="8dp"
        tools:ignore="ContentDescription" />

    <TextView
        android:id="@+id/app_name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        tools:text="F-Droid Application manager with a long name that will wrap and then ellipsize"
        android:textSize="18sp"
        android:textColor="?attr/appListItem"
        android:lines="2"
        android:ellipsize="end"
        app:layout_constraintStart_toEndOf="@+id/icon"
        app:layout_constraintTop_toTopOf="@+id/icon"
        android:layout_marginLeft="8dp"
        android:layout_marginStart="8dp"
        app:layout_constraintEnd_toStartOf="@+id/buttons"
        android:layout_marginEnd="8dp"
        android:layout_marginRight="8dp" />

    <TextView
        android:id="@+id/status"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        tools:text="Installed"
        style="@style/AppListItemStatusText"
        app:layout_constraintTop_toBottomOf="@+id/app_name"
        app:layout_constraintStart_toEndOf="@+id/icon"
        android:layout_marginStart="8dp"
        android:layout_marginLeft="8dp" />

    <FrameLayout
        android:id="@+id/buttons"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginRight="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/icon">

        <ImageView
            android:id="@+id/install"
            tools:src="@drawable/ic_download"
            android:scaleType="fitXY"
            android:contentDescription="@string/menu_install"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:elevation="2dp"
            android:padding="4dp" />

        <Button
            android:id="@+id/action_button"
            style="@style/DetailsPrimaryButtonStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            tools:text="Update" />

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>