<?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="64dp"
    android:background="?selectableItemBackground"
    android:clickable="true"
    android:focusable="true">

    <org.thoughtcrime.securesms.components.AvatarImageView
        android:id="@+id/recipient_avatar"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_marginStart="16dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:src="@tools:sample/avatars" />

    <androidx.appcompat.widget.AppCompatCheckBox
        android:id="@+id/recipient_selected"
        android:layout_width="22dp"
        android:layout_height="22dp"
        android:background="@drawable/contact_selection_checkbox"
        android:button="@null"
        android:clickable="false"
        android:focusable="false"
        app:layout_constraintBottom_toBottomOf="@+id/recipient_avatar"
        app:layout_constraintEnd_toEndOf="@+id/recipient_avatar"
        tools:checked="true" />

    <org.thoughtcrime.securesms.components.emoji.EmojiTextView
        android:id="@+id/recipient_name"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="8dp"
        android:gravity="start|center_vertical"
        android:textAlignment="viewStart"
        android:maxLines="2"
        android:textAppearance="@style/Signal.Text.Body"
        app:layout_constraintBottom_toBottomOf="@+id/recipient_avatar"
        app:layout_constraintEnd_toStartOf="@+id/request_deny"
        app:layout_constraintHorizontal_bias="0"
        app:layout_constraintStart_toEndOf="@+id/recipient_avatar"
        app:layout_constraintTop_toTopOf="@+id/recipient_avatar"
        tools:text="@tools:sample/full_names" />

    <ImageButton
        android:id="@+id/request_approve"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:contentDescription="@string/GroupRecipientListItem_approve_description"
        android:padding="10dp"
        app:layout_constraintBottom_toBottomOf="@+id/recipient_avatar"
        app:layout_constraintEnd_toStartOf="@+id/popupMenuProgressContainer"
        app:layout_constraintTop_toTopOf="@+id/recipient_avatar"
        app:srcCompat="@drawable/ic_check_28_tinted" />

    <ImageButton
        android:id="@+id/request_deny"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        android:contentDescription="@string/GroupRecipientListItem_deny_description"
        android:padding="10dp"
        app:layout_constraintBottom_toBottomOf="@+id/recipient_avatar"
        app:layout_constraintEnd_toStartOf="@+id/request_approve"
        app:layout_constraintTop_toTopOf="@+id/recipient_avatar"
        app:srcCompat="@drawable/ic_deny_28_tinted" />

    <FrameLayout
        android:id="@+id/popupMenuProgressContainer"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_marginEnd="16dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:visibility="visible">

        <org.thoughtcrime.securesms.groups.ui.PopupMenuView
            android:id="@+id/popupMenu"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginEnd="16dp"
            android:visibility="gone"
            app:background_tint="@color/signal_text_primary"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:visibility="visible" />

        <ProgressBar
            android:id="@+id/menuBusyProgress"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:indeterminate="true"
            android:visibility="gone"
            tools:visibility="visible" />

    </FrameLayout>

</androidx.constraintlayout.widget.ConstraintLayout>