<?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="match_parent"
    android:background="@color/colorContent"
    android:fitsSystemWindows="false"
    tools:context=".activity.DetailActivity">

    <ScrollView
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

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

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <ImageView
                    android:id="@+id/detailImage"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:adjustViewBounds="true"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:srcCompat="@mipmap/sp1" />

                <ImageView
                    android:id="@+id/detailBack"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_marginStart="16dp"
                    android:layout_marginTop="42dp"
                    android:background="@drawable/back_bg"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:srcCompat="@drawable/ic_baseline_navigate_before_24dp" />

            </androidx.constraintlayout.widget.ConstraintLayout>

            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="15sp"
                android:background="@drawable/detail_info">

                <TextView
                    android:id="@+id/detailName"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="24dp"
                    android:layout_marginTop="20dp"
                    android:text="TextView"
                    android:textSize="24sp"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toTopOf="parent" />

                <TextView
                    android:id="@+id/detailPrice"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="24dp"
                    android:layout_marginTop="12dp"
                    android:layout_marginBottom="20dp"
                    android:text="TextView"
                    android:textColor="#F56C6C"
                    android:textSize="20sp"
                    app:layout_constraintBottom_toBottomOf="parent"
                    app:layout_constraintStart_toStartOf="parent"
                    app:layout_constraintTop_toBottomOf="@+id/detailName" />

                <ImageView
                    android:id="@+id/detailFavorite"
                    android:layout_width="40dp"
                    android:layout_height="40dp"
                    android:layout_marginTop="20dp"
                    android:layout_marginEnd="24dp"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="parent"
                    app:srcCompat="@drawable/ic_baseline_favorite_border_24dp" />
            </androidx.constraintlayout.widget.ConstraintLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="15dp"
                android:background="@drawable/radius_content"
                android:orientation="vertical"
                android:padding="24sp">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginBottom="10sp"
                    android:gravity="center_vertical"
                    android:text="详情"
                    android:textSize="24sp" />

                <TextView
                    android:id="@+id/detailContent"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="内容"
                    android:textSize="20sp" />
            </LinearLayout>

        </LinearLayout>

    </ScrollView>

    <Button
        android:id="@+id/detailAddCartBtn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="32dp"
        android:layout_marginBottom="32dp"
        android:padding="8sp"
        android:text="添加到购物车"
        android:textSize="20sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>