<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_marginLeft="4dp"
        android:layout_marginTop="8dp"
        android:layout_marginRight="4dp"
        android:background="@drawable/bg_commodity_item">

        <io.github.florent37.shapeofview.ShapeOfView
            android:id="@+id/coverImage"
            android:layout_width="match_parent"
            android:layout_height="160dp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:shape_clip_drawable="@drawable/bg_commodity_cover">

            <com.facebook.drawee.view.SimpleDraweeView
                android:id="@+id/coverImageView"
                style="@style/frescoStyle"
                android:layout_width="match_parent"
                android:layout_height="160dp" />
        </io.github.florent37.shapeofview.ShapeOfView>

        <TextView
            android:id="@+id/name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:ellipsize="end"
            android:includeFontPadding="false"
            android:lineSpacingExtra="6dp"
            android:maxLines="2"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:textColor="@color/text_title"
            android:textSize="13sp"
            android:textStyle="bold"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/coverImage"
            tools:text="犬夜叉经典阿离同款抱枕卡通动漫人物犬夜叉经典阿离同款抱枕卡通动漫人物" />

        <TextView
            android:id="@+id/energy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginTop="8dp"
            android:textColor="@color/text_F10000"
            android:textSize="14sp"
            android:textStyle="bold"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/name"
            tools:text="200" />

        <TextView
            android:id="@+id/energySuffix"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="2dp"
            android:text="光能"
            android:textColor="@color/text_F10000"
            android:textSize="10sp"
            android:textStyle="bold"
            app:layout_constraintBottom_toBottomOf="@+id/energy"
            app:layout_constraintLeft_toRightOf="@+id/energy"
            app:layout_constraintTop_toTopOf="@+id/energy" />

        <TextView
            android:id="@+id/originEnergy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:textColor="@color/text_body"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="@+id/energySuffix"
            app:layout_constraintLeft_toRightOf="@+id/energySuffix"
            app:layout_constraintTop_toTopOf="@+id/energySuffix"
            tools:text="500光能" />

        <TextView
            android:id="@+id/exchangeCountTv"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="8dp"
            android:layout_marginTop="10dp"
            android:layout_marginBottom="16dp"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="12sp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/energy"
            tools:text="已兑240件" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="8dp"
            android:layout_marginBottom="16dp"
            android:textColor="@color/text_subtitleDesc"
            android:textSize="12sp"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            tools:text="剩7天"
            tools:visibility="visible" />

        <TextView
            android:id="@+id/tagTv"
            android:layout_width="wrap_content"
            android:layout_height="18dp"
            android:background="@drawable/bg_commodity_tag"
            android:gravity="center"
            android:paddingLeft="8dp"
            android:paddingRight="8dp"
            android:textColor="@color/white"
            android:textSize="10sp"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="限时限量" />

        <LinearLayout
            android:id="@+id/timerContainer"
            android:layout_width="match_parent"
            android:layout_height="26dp"
            android:layout_marginTop="8dp"
            android:gravity="center"
            android:orientation="horizontal"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/energy"
            tools:background="@drawable/bg_shelve_timer"
            tools:visibility="visible">

            <ImageView
                android:id="@+id/timerIv"
                android:layout_width="10dp"
                android:layout_height="10dp"
                tools:src="@drawable/ic_shelve" />

            <TextView
                android:id="@+id/timerTv"
                android:layout_width="wrap_content"
                android:layout_height="26dp"
                android:layout_marginLeft="4dp"
                android:gravity="center"
                android:textColor="#FFA142"
                android:textSize="10sp"
                tools:text="23:59:58 后开抢" />
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>