<?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:paddingBottom="8dp"
    android:clipToPadding="false">

    <!-- 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" />

    <ImageView
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_marginStart="48dp"
        android:layout_marginLeft="48dp"
        android:layout_marginTop="40dp"
        app:srcCompat="@drawable/ic_known_vuln_overlay"
        android:scaleType="fitCenter"
        tools:ignore="ContentDescription"/>

    <TextView
        android:id="@+id/app_name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        tools:text="We found a vulnerability with VulnApp. We recommend uninstalling this app immediately."
        android:textSize="16sp"
        android:textColor="?attr/installedApps"
        android:ellipsize="end"
        app:layout_constraintStart_toEndOf="@+id/icon"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginTop="8dp"
        android:layout_marginRight="8dp" />

    <Button
        android:id="@+id/action_button"
        style="@style/DetailsPrimaryButtonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/app_name"
        tools:text="Uninstall"/>

    <Button
        android:id="@+id/secondary_button"
        style="@style/DetailsSecondaryButtonStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:layout_marginRight="16dp"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toStartOf="@+id/action_button"
        app:layout_constraintTop_toBottomOf="@+id/app_name"
        tools:text="Ignore"/>

</androidx.constraintlayout.widget.ConstraintLayout>