<?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"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="20dp"
    android:layout_marginEnd="20dp"
    android:layout_marginBottom="16dp"
    android:padding="12dp"
    android:background="@drawable/round_create">

    <!-- 可滑动的内容区 -->
    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/item_con"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <!-- 图片 -->
        <ImageView
            android:id="@+id/item_imageview_radio"
            android:layout_width="80dp"
            android:layout_height="60dp"
            android:src="@mipmap/savesound"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />

        <!-- 标题 -->
        <TextView
            android:id="@+id/title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:text="@string/snoring"
            app:layout_constraintStart_toEndOf="@+id/item_imageview_radio"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintEnd_toStartOf="@+id/duration" />

        <!-- 日期 -->
        <TextView
            android:id="@+id/date"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="8dp"
            android:text="date"
            app:layout_constraintStart_toEndOf="@+id/item_imageview_radio"
            app:layout_constraintTop_toBottomOf="@+id/title"
            app:layout_constraintEnd_toStartOf="@+id/duration" />

        <!-- 时间 -->
        <TextView
            android:id="@+id/time"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:text="time"
            app:layout_constraintStart_toEndOf="@+id/date"
            app:layout_constraintTop_toBottomOf="@+id/title"
            app:layout_constraintBottom_toBottomOf="@+id/date" />

        <!-- 时长 -->
        <TextView
            android:id="@+id/duration"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="File duration"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <!-- 收藏图标 -->
        <ImageView
            android:id="@+id/favorite"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:src="@drawable/unfavorite"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/duration" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <!-- 左滑显示的 LinearLayout -->
    <LinearLayout
        android:id="@+id/item_linear"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:layout_gravity="end"
        app:layout_constraintStart_toEndOf="@+id/item_con"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent">

        <!-- 编辑按钮 -->
        <TextView
            android:id="@+id/jianyi_zhiding"
            android:layout_width="64dp"
            android:layout_height="match_parent"
            android:gravity="center"
            android:text="编辑"
            android:textAlignment="center"
            android:textColor="#222222"
            android:background="#eaeaea" />

        <!-- 删除按钮 -->
        <TextView
            android:id="@+id/jianyi_delete"
            android:layout_width="64dp"
            android:layout_height="match_parent"
            android:gravity="center"
            android:text="删除"
            android:textAlignment="center"
            android:textColor="#FFFFFF"
            android:background="#D52619" />

    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>
