166 lines
6.9 KiB
XML
166 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:strokeWidth="0dp"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_marginHorizontal="8dp"
|
|
android:layout_marginVertical="4dp">
|
|
<LinearLayout
|
|
android:id="@+id/ll_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:padding="8dp"
|
|
android:clickable="true"
|
|
android:background="?attr/selectableItemBackground"
|
|
android:orientation="horizontal"
|
|
android:scrollbars="none">
|
|
|
|
<!-- 封面图片 -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:cardCornerRadius="8dp"
|
|
app:strokeWidth="0dp">
|
|
|
|
<io.legado.app.ui.widget.image.CoverImageView
|
|
android:id="@+id/iv_cover"
|
|
android:layout_width="80dp"
|
|
android:layout_height="110dp"
|
|
android:contentDescription="@string/img_cover"
|
|
android:scaleType="centerCrop"
|
|
android:src="@drawable/image_cover_default"
|
|
android:transitionName="img_cover"
|
|
tools:ignore="UnusedAttribute" />
|
|
|
|
<!-- 书架内标记 -->
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/iv_in_bookshelf"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentStart="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_margin="4dp"
|
|
android:scaleType="centerCrop"
|
|
android:visibility="visible"
|
|
app:cardBackgroundColor="?attr/colorTertiaryContainer"
|
|
app:cardCornerRadius="4dp"
|
|
app:strokeWidth="0dp">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_bookshelf"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="4dp"
|
|
android:paddingVertical="2dp"
|
|
android:text="@string/remove_from_bookshelf"
|
|
android:textColor="?attr/colorOnTertiaryContainer"
|
|
android:textStyle="bold"
|
|
android:textSize="9sp"
|
|
tools:ignore="SmallSp" />
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
<!-- 右侧内容区域 -->
|
|
<LinearLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_gravity="center"
|
|
android:orientation="vertical">
|
|
|
|
<!-- 标题行 -->
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_name"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:singleLine="true"
|
|
android:text="@string/app_name"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
app:layout_constraintEnd_toStartOf="@id/cd_count"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<com.google.android.material.card.MaterialCardView
|
|
android:id="@+id/cd_count"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:visibility="gone"
|
|
android:layout_marginVertical="4dp"
|
|
app:cardBackgroundColor="?attr/colorSurfaceContainer"
|
|
app:cardCornerRadius="4dp"
|
|
app:layout_constraintBottom_toBottomOf="@id/tv_name"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="@id/tv_name"
|
|
app:strokeWidth="0dp">
|
|
|
|
<TextView
|
|
android:id="@+id/bv_originCount"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingHorizontal="4dp"
|
|
android:paddingVertical="2dp"
|
|
android:text="@string/text"
|
|
android:textColor="?attr/colorPrimary"
|
|
android:textSize="10sp"
|
|
android:textStyle="bold"
|
|
tools:ignore="SmallSp" />
|
|
</com.google.android.material.card.MaterialCardView>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_author"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="?attr/colorSecondary"
|
|
android:lines="1"
|
|
android:singleLine="true"
|
|
android:text="@string/author"
|
|
android:textSize="12sp" />
|
|
|
|
<!-- 最后阅读 -->
|
|
<TextView
|
|
android:id="@+id/tv_lasted"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:ellipsize="end"
|
|
android:lines="1"
|
|
android:text="@string/last_read"
|
|
android:textSize="11sp" />
|
|
|
|
<!-- 简介 -->
|
|
<TextView
|
|
android:id="@+id/tv_introduce"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="2"
|
|
android:ellipsize="end"
|
|
android:text="@string/book_intro"
|
|
android:textSize="11sp" />
|
|
|
|
<HorizontalScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:scrollbars="none"
|
|
android:layout_marginTop="2dp">
|
|
<LinearLayout
|
|
android:id="@+id/kind_container"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal" />
|
|
</HorizontalScrollView>
|
|
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
</com.google.android.material.card.MaterialCardView> |