<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="horizontal"
    android:paddingVertical="@dimen/spacer_2x">

    <ImageView
        android:id="@+id/avatar"
        android:layout_width="@dimen/avatar_size"
        android:layout_height="match_parent"
        android:layout_marginEnd="@dimen/spacer_2x"
        android:contentDescription="@null"
        app:srcCompat="@drawable/ic_person_24dp"
        tools:srcCompat="@tools:sample/avatars" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginBottom="@dimen/spacer_1x"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/username"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_weight="1"
                android:textAppearance="?attr/textAppearanceListItem"
                tools:drawableEnd="@drawable/ic_sync_18dp"
                tools:text="@tools:sample/full_names" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/delete"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:background="?android:selectableItemBackground"
                android:padding="0dp"
                app:srcCompat="@drawable/ic_delete_24dp" />
        </LinearLayout>

        <com.google.android.flexbox.FlexboxLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:flexWrap="wrap"
            app:justifyContent="space_between">

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/permission_edit"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/edit"
                app:switchPadding="@dimen/spacer_1x" />

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/permission_share"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/simple_share"
                app:switchPadding="@dimen/spacer_1x" />

            <androidx.appcompat.widget.SwitchCompat
                android:id="@+id/permission_manage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:text="@string/simple_manage"
                app:switchPadding="@dimen/spacer_1x" />

        </com.google.android.flexbox.FlexboxLayout>
    </LinearLayout>

</LinearLayout>