|
@@ -2,98 +2,95 @@
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
|
- android:id="@+id/cv_content"
|
|
|
|
|
android:layout_width="match_parent"
|
|
android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
|
- android:background="@drawable/bg_item_focused_on_tv"
|
|
|
|
|
- android:clickable="true"
|
|
|
|
|
- android:focusable="true"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
- tools:ignore="UnusedAttribute">
|
|
|
|
|
|
|
+ android:layout_height="wrap_content">
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- <LinearLayout
|
|
|
|
|
|
|
+ <com.google.android.material.card.MaterialCardView
|
|
|
|
|
+ android:id="@+id/cv_content"
|
|
|
android:layout_width="match_parent"
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
- android:orientation="vertical"
|
|
|
|
|
- android:paddingLeft="8dp"
|
|
|
|
|
- android:paddingTop="8dp"
|
|
|
|
|
- android:paddingRight="8dp"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
|
|
+ android:layout_marginBottom="4dp"
|
|
|
|
|
+ android:foreground="?attr/selectableItemBackground"
|
|
|
|
|
+ android:clickable="true"
|
|
|
|
|
+ android:focusable="true"
|
|
|
|
|
+ app:strokeWidth="0dp"
|
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
|
|
|
|
- <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
|
|
|
|
+ <LinearLayout
|
|
|
android:layout_width="match_parent"
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
|
- android:scrollbars="none">
|
|
|
|
|
|
|
+ android:orientation="vertical">
|
|
|
|
|
|
|
|
- <io.legado.app.ui.widget.image.CoverImageView
|
|
|
|
|
- android:id="@+id/iv_cover"
|
|
|
|
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
android:layout_width="match_parent"
|
|
android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
|
- android:layout_margin="8dp"
|
|
|
|
|
- android:scaleType="centerCrop"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
- android:src="@drawable/image_cover_default"
|
|
|
|
|
- android:transitionName="img_cover"
|
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
|
- tools:ignore="UnusedAttribute,ImageContrastCheck"
|
|
|
|
|
- tools:layout_editor_absoluteX="8dp" />
|
|
|
|
|
|
|
+ android:layout_height="wrap_content">
|
|
|
|
|
|
|
|
- <io.legado.app.ui.widget.text.BadgeView
|
|
|
|
|
- android:id="@+id/bv_unread"
|
|
|
|
|
- android:layout_width="wrap_content"
|
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
|
- android:layout_gravity="right"
|
|
|
|
|
- android:includeFontPadding="false"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
- app:layout_constraintRight_toRightOf="parent"
|
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
|
- tools:ignore="RtlHardcoded" />
|
|
|
|
|
|
|
+ <!-- 书封面 -->
|
|
|
|
|
+ <io.legado.app.ui.widget.image.CoverImageView
|
|
|
|
|
+ android:id="@+id/iv_cover"
|
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
|
+ android:layout_margin="8dp"
|
|
|
|
|
+ android:scaleType="centerCrop"
|
|
|
|
|
+ android:src="@drawable/image_cover_default"
|
|
|
|
|
+ android:transitionName="img_cover"
|
|
|
|
|
+ app:layout_constraintTop_toTopOf="parent"
|
|
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
|
|
+ tools:ignore="ImageContrastCheck" />
|
|
|
|
|
|
|
|
- <io.legado.app.ui.widget.anima.RotateLoading
|
|
|
|
|
- android:id="@+id/rl_loading"
|
|
|
|
|
- android:layout_width="22dp"
|
|
|
|
|
- android:layout_height="22dp"
|
|
|
|
|
- android:layout_gravity="right"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
- android:visibility="invisible"
|
|
|
|
|
- app:layout_constraintRight_toRightOf="parent"
|
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
|
- app:loading_width="2dp"
|
|
|
|
|
- tools:ignore="RtlHardcoded" />
|
|
|
|
|
|
|
+ <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_constraintTop_toTopOf="@id/iv_cover"
|
|
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/iv_cover">
|
|
|
|
|
|
|
|
- </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
+ <TextView
|
|
|
|
|
+ android:id="@+id/tv_unread"
|
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
|
+ android:textColor="?attr/colorSurface"
|
|
|
|
|
+ android:textSize="10sp"
|
|
|
|
|
+ android:padding="4dp"
|
|
|
|
|
+ android:textStyle="bold"
|
|
|
|
|
+ android:includeFontPadding="false"
|
|
|
|
|
+ tools:text="5"
|
|
|
|
|
+ tools:ignore="SmallSp" />
|
|
|
|
|
|
|
|
- <TextView
|
|
|
|
|
- android:id="@+id/tv_name"
|
|
|
|
|
- android:layout_width="match_parent"
|
|
|
|
|
- android:layout_height="wrap_content"
|
|
|
|
|
- android:layout_marginTop="6dp"
|
|
|
|
|
- android:ellipsize="end"
|
|
|
|
|
- android:gravity="top|center_horizontal"
|
|
|
|
|
- android:includeFontPadding="false"
|
|
|
|
|
- android:lines="2"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
- android:text="@string/book_name"
|
|
|
|
|
- android:textColor="@color/primaryText"
|
|
|
|
|
- android:textSize="12sp"
|
|
|
|
|
- tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
|
|
|
|
+ </com.google.android.material.card.MaterialCardView>
|
|
|
|
|
|
|
|
- </LinearLayout>
|
|
|
|
|
-
|
|
|
|
|
- <View
|
|
|
|
|
- android:id="@+id/vw_foreground"
|
|
|
|
|
- android:layout_width="match_parent"
|
|
|
|
|
- android:layout_height="0dp"
|
|
|
|
|
- android:background="?android:attr/selectableItemBackground"
|
|
|
|
|
- android:scrollbars="none"
|
|
|
|
|
- app:layout_constraintBottom_toBottomOf="parent"
|
|
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
|
|
- app:layout_constraintVertical_bias="0.0"
|
|
|
|
|
- tools:layout_editor_absoluteX="0dp" />
|
|
|
|
|
|
|
+ <!-- 加载指示器 -->
|
|
|
|
|
+ <com.google.android.material.progressindicator.CircularProgressIndicator
|
|
|
|
|
+ android:id="@+id/rl_loading"
|
|
|
|
|
+ android:layout_width="wrap_content"
|
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
|
+ android:visibility="invisible"
|
|
|
|
|
+ app:layout_constraintTop_toTopOf="@id/iv_cover"
|
|
|
|
|
+ app:layout_constraintEnd_toEndOf="@id/iv_cover"
|
|
|
|
|
+ android:layout_margin="8dp" />
|
|
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
|
|
|
|
|
|
+ <!-- 书名 -->
|
|
|
|
|
+ <TextView
|
|
|
|
|
+ android:id="@+id/tv_name"
|
|
|
|
|
+ android:layout_width="match_parent"
|
|
|
|
|
+ android:layout_height="wrap_content"
|
|
|
|
|
+ android:layout_marginTop="8dp"
|
|
|
|
|
+ android:layout_marginBottom="4dp"
|
|
|
|
|
+ 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>
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|