|
|
@@ -1,106 +1,82 @@
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+<com.google.android.material.card.MaterialCardView 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">
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:clickable="true"
|
|
|
+ android:focusable="true"
|
|
|
+ app:strokeWidth="0dp">
|
|
|
|
|
|
- <com.google.android.material.card.MaterialCardView
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
android:id="@+id/cv_content"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
|
- app:cardBackgroundColor="@android:color/transparent"
|
|
|
- android:layout_marginBottom="4dp"
|
|
|
- android:clickable="true"
|
|
|
- android:focusable="true"
|
|
|
- app:strokeWidth="0dp"
|
|
|
- app:layout_constraintTop_toTopOf="parent">
|
|
|
+ android:layout_margin="8dp"
|
|
|
+ app:strokeWidth="0dp">
|
|
|
|
|
|
- <LinearLayout
|
|
|
+ <io.legado.app.ui.widget.image.CoverImageView
|
|
|
+ android:id="@+id/iv_cover"
|
|
|
android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:orientation="vertical">
|
|
|
-
|
|
|
- <com.google.android.material.card.MaterialCardView
|
|
|
- android:id="@+id/cd_cover"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- app:cardCornerRadius="6dp"
|
|
|
- android:layout_marginHorizontal="8dp"
|
|
|
- android:layout_marginTop="8dp"
|
|
|
- android:transitionName="img_cover"
|
|
|
- app:strokeWidth="0dp">
|
|
|
-
|
|
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content">
|
|
|
-
|
|
|
- <io.legado.app.ui.widget.image.CoverImageView
|
|
|
- android:id="@+id/iv_cover"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="match_parent"
|
|
|
- android:scaleType="centerCrop"
|
|
|
- android:src="@drawable/image_cover_default"
|
|
|
- tools:ignore="ImageContrastCheck" />
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:scaleType="centerCrop"
|
|
|
+ android:src="@drawable/image_cover_default"
|
|
|
+ tools:ignore="ImageContrastCheck" />
|
|
|
|
|
|
- <com.google.android.material.progressindicator.LinearProgressIndicator
|
|
|
- android:id="@+id/rl_loading"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginVertical="4dp"
|
|
|
- android:layout_marginHorizontal="12dp"
|
|
|
- android:indeterminate="true"
|
|
|
- android:visibility="invisible"
|
|
|
- android:layout_gravity="top"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- app:layout_constraintStart_toStartOf="parent"
|
|
|
- app:layout_constraintTop_toTopOf="parent" />
|
|
|
+ <com.google.android.material.progressindicator.LinearProgressIndicator
|
|
|
+ android:id="@+id/rl_loading"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginVertical="4dp"
|
|
|
+ android:layout_marginHorizontal="12dp"
|
|
|
+ android:indeterminate="true"
|
|
|
+ android:visibility="invisible"
|
|
|
+ android:layout_gravity="top"
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
|
|
+ app:layout_constraintStart_toStartOf="@id/iv_cover"
|
|
|
+ app:layout_constraintTop_toTopOf="@id/iv_cover" />
|
|
|
|
|
|
- <com.google.android.material.card.MaterialCardView
|
|
|
- android:id="@+id/cd_unread"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_margin="4dp"
|
|
|
- android:visibility="visible"
|
|
|
- app:cardCornerRadius="4dp"
|
|
|
- app:strokeWidth="0dp"
|
|
|
- app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
|
|
- app:layout_constraintEnd_toEndOf="parent"
|
|
|
- app:layout_constraintTop_toTopOf="parent">
|
|
|
+ <com.google.android.material.card.MaterialCardView
|
|
|
+ android:id="@+id/cd_unread"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_margin="4dp"
|
|
|
+ android:visibility="visible"
|
|
|
+ app:cardCornerRadius="4dp"
|
|
|
+ app:strokeWidth="0dp"
|
|
|
+ app:cardBackgroundColor="?attr/colorSecondaryVariant"
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
|
|
+ app:layout_constraintTop_toTopOf="@id/iv_cover">
|
|
|
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_unread"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:textColor="?attr/colorOnSecondary"
|
|
|
- android:textSize="10sp"
|
|
|
- android:padding="4dp"
|
|
|
- android:textStyle="bold"
|
|
|
- android:includeFontPadding="false"
|
|
|
- tools:text="5"
|
|
|
- tools:ignore="SmallSp" />
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_unread"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:textColor="?attr/colorOnSecondary"
|
|
|
+ android:textSize="10sp"
|
|
|
+ android:padding="4dp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ android:includeFontPadding="false"
|
|
|
+ tools:text="5"
|
|
|
+ tools:ignore="SmallSp" />
|
|
|
|
|
|
- </com.google.android.material.card.MaterialCardView>
|
|
|
+ </com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+ <!-- 书名 -->
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_name"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="4dp"
|
|
|
+ android:layout_marginBottom="6dp"
|
|
|
+ android:ellipsize="end"
|
|
|
+ android:lines="2"
|
|
|
+ android:text="@string/book_name"
|
|
|
+ android:textSize="12sp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ tools:ignore="RtlHardcoded"
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/iv_cover"/>
|
|
|
|
|
|
- </com.google.android.material.card.MaterialCardView>
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
- <!-- 书名 -->
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_name"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginTop="4dp"
|
|
|
- android:layout_marginBottom="6dp"
|
|
|
- android:layout_marginHorizontal="8dp"
|
|
|
- android:ellipsize="end"
|
|
|
- android:gravity="left"
|
|
|
- android:lines="2"
|
|
|
- android:text="@string/book_name"
|
|
|
- android:textSize="12sp"
|
|
|
- android:textStyle="bold"
|
|
|
- tools:ignore="RtlHardcoded" />
|
|
|
- </LinearLayout>
|
|
|
- </com.google.android.material.card.MaterialCardView>
|
|
|
-</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+</com.google.android.material.card.MaterialCardView>
|