<!--
  ~ This file is part of LSPosed.
  ~
  ~ LSPosed is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ LSPosed is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with LSPosed.  If not, see <https://www.gnu.org/licenses/>.
  ~
  ~ Copyright (C) 2020 EdXposed Contributors
  ~ Copyright (C) 2021 LSPosed Contributors
  -->

<FrameLayout 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:background="@drawable/item_background"
    android:clickable="true"
    android:focusable="true"
    android:minHeight="?attr/listPreferredItemHeight"
    android:paddingVertical="16dp"
    android:paddingStart="16dp"
    android:paddingEnd="24dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/item_root"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        tools:ignore="RtlSymmetry">

        <ImageView
            android:id="@+id/app_icon"
            android:layout_width="36dp"
            android:layout_height="36dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:ignore="ContentDescription"
            tools:srcCompat="@tools:sample/backgrounds/scenic" />

        <TextView
            android:id="@+id/app_name"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="20dp"
            android:singleLine="false"
            android:textAppearance="?android:attr/textAppearance"
            android:textIsSelectable="false"
            android:textSize="16sp"
            app:layout_constraintBottom_toTopOf="@id/description"
            app:layout_constraintStart_toEndOf="@id/app_icon"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="@tools:sample/first_names" />

        <TextView
            android:id="@+id/description"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:textAppearance="?android:attr/textAppearanceSmall"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toStartOf="@id/checkbox"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toStartOf="@+id/app_name"
            app:layout_constraintTop_toBottomOf="@id/app_name"
            tools:text="@tools:sample/lorem" />

        <TextView
            android:id="@+id/version_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="marquee"
            android:marqueeRepeatLimit="marquee_forever"
            android:maxWidth="100dp"
            android:singleLine="true"
            android:textAlignment="viewEnd"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textIsSelectable="false"
            android:visibility="gone"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="1.0"
            app:layout_constraintStart_toEndOf="@+id/app_name"
            app:layout_constraintTop_toTopOf="parent"
            tools:ignore="RtlHardcoded"
            tools:text="@tools:sample/last_names" />

        <com.google.android.material.checkbox.MaterialCheckBox
            android:id="@+id/checkbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:focusable="false"
            android:clickable="false"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>