121 lines
5.0 KiB
XML
121 lines
5.0 KiB
XML
<?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"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginEnd="12dp"
|
|
android:orientation="vertical"
|
|
android:gravity="center_horizontal">
|
|
|
|
|
|
<!-- 四色预览框 -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cardView"
|
|
android:layout_width="112dp"
|
|
android:layout_height="200dp"
|
|
android:layout_marginBottom="8dp"
|
|
app:cardCornerRadius="20dp"
|
|
app:cardBackgroundColor="#000000"
|
|
android:checkable="true"
|
|
app:strokeWidth="4dp"
|
|
android:clickable="true"
|
|
android:focusable="true">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<!-- 一号:左上角 -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cv_title"
|
|
android:layout_width="64dp"
|
|
android:layout_height="16dp"
|
|
android:layout_margin="12dp"
|
|
app:strokeWidth="0dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardBackgroundColor="#FF0000"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent" />
|
|
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cv_book"
|
|
android:layout_width="56dp"
|
|
android:layout_height="80dp"
|
|
android:layout_marginTop="8dp"
|
|
app:strokeWidth="0dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardBackgroundColor="#FFFF00"
|
|
app:layout_constraintTop_toBottomOf="@id/cv_title"
|
|
app:layout_constraintStart_toStartOf="@id/cv_title" />
|
|
|
|
<!-- 三号:在二号内部的右上角 -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cv_pin"
|
|
android:layout_width="20dp"
|
|
android:layout_height="12dp"
|
|
android:layout_margin="4dp"
|
|
app:strokeWidth="0dp"
|
|
app:cardCornerRadius="4dp"
|
|
app:cardBackgroundColor="#0000FF"
|
|
app:layout_constraintTop_toTopOf="@id/cv_book"
|
|
app:layout_constraintEnd_toEndOf="@id/cv_book" />
|
|
|
|
<!-- 四号:最下方 -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cv_bottom"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="32dp"
|
|
android:layout_margin="4dp"
|
|
app:strokeWidth="0dp"
|
|
app:cardCornerRadius="0dp"
|
|
app:cardBackgroundColor="#FFFF00"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent" >
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/left_circle"
|
|
android:layout_width="20dp"
|
|
android:layout_height="20dp"
|
|
app:cardCornerRadius="24dp"
|
|
app:cardBackgroundColor="#000000"
|
|
app:strokeWidth="0dp"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:layout_marginStart="8dp"/>
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/right_rect"
|
|
android:layout_width="62dp"
|
|
android:layout_height="16dp"
|
|
app:cardCornerRadius="8dp"
|
|
app:cardBackgroundColor="#000000"
|
|
app:strokeWidth="0dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
android:layout_marginEnd="8dp"/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
<!-- 主题名称 -->
|
|
<TextView
|
|
android:id="@+id/themeLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="14sp" />
|
|
|
|
</LinearLayout>
|
|
|