|
|
@@ -10,24 +10,23 @@
|
|
|
android:id="@+id/bg_book"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="match_parent"
|
|
|
+ android:foreground="@drawable/bg_book_mask"
|
|
|
android:contentDescription="@string/bg_image"
|
|
|
android:scaleType="centerCrop"
|
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
+
|
|
|
<LinearLayout
|
|
|
android:id="@+id/vw_bg"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="match_parent"
|
|
|
- android:background="#50000000"
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
<io.legado.app.ui.widget.TitleBar
|
|
|
android:id="@+id/title_bar"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
|
- app:layout_constraintTop_toTopOf="parent"
|
|
|
- app:themeMode="dark"
|
|
|
- app:title="@string/book_info" />
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
|
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
|
android:id="@+id/refresh_layout"
|
|
|
@@ -52,46 +51,121 @@
|
|
|
android:layout_height="0dp"
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
- <RelativeLayout
|
|
|
+ <LinearLayout
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
|
- android:layout_marginTop="8dp">
|
|
|
-
|
|
|
- <io.legado.app.ui.widget.image.ArcView
|
|
|
- android:id="@+id/arc_view"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="78dp"
|
|
|
- android:layout_marginTop="90dp"
|
|
|
- app:arcDirectionTop="true"
|
|
|
- app:arcHeight="36dp"
|
|
|
- app:bgColor="@color/background" />
|
|
|
+ android:background="@drawable/bg_gradient_mask"
|
|
|
+ android:padding="16dp">
|
|
|
|
|
|
<androidx.cardview.widget.CardView
|
|
|
android:layout_width="wrap_content"
|
|
|
android:layout_height="wrap_content"
|
|
|
- android:layout_centerHorizontal="true"
|
|
|
- android:layout_margin="3dp"
|
|
|
app:cardCornerRadius="5dp"
|
|
|
app:cardElevation="8dp">
|
|
|
|
|
|
<io.legado.app.ui.widget.image.CoverImageView
|
|
|
android:id="@+id/iv_cover"
|
|
|
- android:layout_width="110dp"
|
|
|
- android:layout_height="160dp"
|
|
|
+ android:layout_width="90dp"
|
|
|
+ android:layout_height="130dp"
|
|
|
android:contentDescription="@string/img_cover"
|
|
|
android:scaleType="centerCrop"
|
|
|
android:src="@drawable/image_cover_default" />
|
|
|
|
|
|
</androidx.cardview.widget.CardView>
|
|
|
|
|
|
- </RelativeLayout>
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:orientation="vertical"
|
|
|
+ android:layout_gravity="center"
|
|
|
+ android:padding="12dp">
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_name"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:maxLines="2"
|
|
|
+ android:text="@string/book_name"
|
|
|
+ style="@style/TextAppearance.Material3.ActionBar.Title"
|
|
|
+ tools:ignore="RtlHardcoded" />
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:gravity="center"
|
|
|
+ android:orientation="horizontal"
|
|
|
+ android:paddingTop="6dp"
|
|
|
+ android:paddingBottom="2dp"
|
|
|
+ tools:ignore="UseCompoundDrawables">
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:layout_width="18sp"
|
|
|
+ android:layout_height="18sp"
|
|
|
+ android:contentDescription="@string/author"
|
|
|
+ android:src="@drawable/ic_author"
|
|
|
+ tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_author"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1"
|
|
|
+ android:layout_marginStart="2dp"
|
|
|
+ android:ellipsize="end"
|
|
|
+ android:singleLine="true"
|
|
|
+ android:text="@string/author"
|
|
|
+ android:textSize="14sp"
|
|
|
+ tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" />
|
|
|
+
|
|
|
+ </LinearLayout>
|
|
|
+
|
|
|
+ <LinearLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:gravity="center_vertical"
|
|
|
+ android:orientation="horizontal">
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_web"
|
|
|
+ android:layout_width="18sp"
|
|
|
+ android:layout_height="18sp"
|
|
|
+ android:contentDescription="@string/origin_format"
|
|
|
+ android:src="@drawable/ic_web_outline"
|
|
|
+ tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_origin"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_weight="1"
|
|
|
+ android:layout_marginStart="2dp"
|
|
|
+ android:ellipsize="end"
|
|
|
+ android:paddingRight="6dp"
|
|
|
+ android:singleLine="true"
|
|
|
+ android:textSize="14sp"
|
|
|
+ tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
|
|
+ tools:text="@string/origin_format" />
|
|
|
+
|
|
|
+ <com.google.android.material.button.MaterialButton
|
|
|
+ android:id="@+id/btn_change_source"
|
|
|
+ style="@style/Widget.Material3.Button.IconButton.Filled.Tonal"
|
|
|
+ android:layout_width="30dp"
|
|
|
+ android:layout_height="30dp"
|
|
|
+ app:iconGravity="textStart"
|
|
|
+ app:icon="@drawable/ic_change_source"
|
|
|
+ app:iconSize="18dp"
|
|
|
+ tools:contentDescription="@string/change_origin" />
|
|
|
+
|
|
|
+ </LinearLayout>
|
|
|
+
|
|
|
+ </LinearLayout>
|
|
|
+ </LinearLayout>
|
|
|
|
|
|
<LinearLayout
|
|
|
android:id="@+id/ll_info"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="match_parent"
|
|
|
- android:background="@color/background"
|
|
|
android:orientation="vertical"
|
|
|
+ android:background="@color/background_theme"
|
|
|
android:paddingLeft="8dp"
|
|
|
android:paddingRight="8dp"
|
|
|
android:paddingBottom="8dp">
|
|
|
@@ -112,16 +186,7 @@
|
|
|
android:layout_marginBottom="6dp"
|
|
|
android:scrollbars="none">
|
|
|
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_name"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:includeFontPadding="false"
|
|
|
- android:singleLine="true"
|
|
|
- android:text="@string/book_name"
|
|
|
- android:textColor="@color/primaryText"
|
|
|
- android:textSize="18sp"
|
|
|
- tools:ignore="RtlHardcoded" />
|
|
|
+
|
|
|
</HorizontalScrollView>
|
|
|
|
|
|
<HorizontalScrollView
|
|
|
@@ -149,79 +214,42 @@
|
|
|
android:paddingBottom="8dp">
|
|
|
|
|
|
<LinearLayout
|
|
|
+ android:id="@+id/ll_toc"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
|
android:gravity="center_vertical"
|
|
|
android:orientation="horizontal"
|
|
|
- android:paddingTop="3dp"
|
|
|
- android:paddingBottom="3dp"
|
|
|
- tools:ignore="UseCompoundDrawables">
|
|
|
-
|
|
|
- <ImageView
|
|
|
- android:layout_width="18sp"
|
|
|
- android:layout_height="18sp"
|
|
|
- android:contentDescription="@string/author"
|
|
|
- android:paddingRight="2dp"
|
|
|
- android:src="@drawable/ic_author"
|
|
|
- app:tint="@color/tv_text_summary"
|
|
|
- tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
-
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_author"
|
|
|
- android:layout_width="0dp"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_weight="1"
|
|
|
- android:ellipsize="end"
|
|
|
- android:includeFontPadding="false"
|
|
|
- android:paddingRight="6dp"
|
|
|
- android:singleLine="true"
|
|
|
- android:text="@string/author"
|
|
|
- android:textColor="@color/tv_text_summary"
|
|
|
- android:textSize="13sp"
|
|
|
- tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" />
|
|
|
-
|
|
|
- </LinearLayout>
|
|
|
-
|
|
|
- <LinearLayout
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:gravity="center_vertical"
|
|
|
- android:orientation="horizontal"
|
|
|
- android:paddingTop="3dp"
|
|
|
- android:paddingBottom="3dp">
|
|
|
+ android:paddingTop="4dp"
|
|
|
+ android:paddingBottom="4dp">
|
|
|
|
|
|
<ImageView
|
|
|
- android:id="@+id/iv_web"
|
|
|
android:layout_width="18sp"
|
|
|
android:layout_height="18sp"
|
|
|
- android:contentDescription="@string/origin_format"
|
|
|
+ android:contentDescription="@string/read_dur_progress"
|
|
|
android:paddingRight="2dp"
|
|
|
- android:src="@drawable/ic_web_outline"
|
|
|
- app:tint="@color/tv_text_summary"
|
|
|
+ android:src="@drawable/ic_chapter"
|
|
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
|
|
|
<TextView
|
|
|
- android:id="@+id/tv_origin"
|
|
|
+ android:id="@+id/tv_toc"
|
|
|
android:layout_width="0dp"
|
|
|
android:layout_height="wrap_content"
|
|
|
android:layout_weight="1"
|
|
|
android:ellipsize="end"
|
|
|
android:includeFontPadding="false"
|
|
|
android:paddingRight="6dp"
|
|
|
- android:singleLine="true"
|
|
|
- android:textColor="@color/tv_text_summary"
|
|
|
- android:textSize="13sp"
|
|
|
+ android:textSize="14sp"
|
|
|
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
|
|
- tools:text="@string/origin_format" />
|
|
|
+ tools:text="@string/toc_s" />
|
|
|
|
|
|
<io.legado.app.ui.widget.text.AccentBgTextView
|
|
|
- android:id="@+id/tv_change_source"
|
|
|
+ android:id="@+id/tv_toc_view"
|
|
|
android:layout_width="wrap_content"
|
|
|
android:layout_height="wrap_content"
|
|
|
android:layout_marginStart="8dp"
|
|
|
android:paddingLeft="5dp"
|
|
|
android:paddingRight="5dp"
|
|
|
- android:text="@string/change_origin"
|
|
|
+ android:text="@string/view_toc"
|
|
|
android:textSize="13sp"
|
|
|
app:radius="2dp" />
|
|
|
|
|
|
@@ -243,7 +271,6 @@
|
|
|
android:contentDescription="@string/read_dur_progress"
|
|
|
android:paddingRight="2dp"
|
|
|
android:src="@drawable/ic_book_last"
|
|
|
- app:tint="@color/tv_text_summary"
|
|
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
|
|
|
<TextView
|
|
|
@@ -255,7 +282,6 @@
|
|
|
android:includeFontPadding="false"
|
|
|
android:paddingRight="6dp"
|
|
|
android:singleLine="true"
|
|
|
- android:textColor="@color/tv_text_summary"
|
|
|
android:textSize="13sp"
|
|
|
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
|
|
tools:text="@string/read_dur_progress" />
|
|
|
@@ -276,7 +302,6 @@
|
|
|
android:contentDescription="@string/read_dur_progress"
|
|
|
android:paddingRight="2dp"
|
|
|
android:src="@drawable/ic_groups"
|
|
|
- app:tint="@color/tv_text_summary"
|
|
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
|
|
|
<TextView
|
|
|
@@ -288,7 +313,6 @@
|
|
|
android:includeFontPadding="false"
|
|
|
android:paddingRight="6dp"
|
|
|
android:singleLine="true"
|
|
|
- android:textColor="@color/tv_text_summary"
|
|
|
android:textSize="13sp"
|
|
|
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
|
|
tools:text="@string/group_s" />
|
|
|
@@ -306,50 +330,7 @@
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
- <LinearLayout
|
|
|
- android:id="@+id/ll_toc"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:gravity="center_vertical"
|
|
|
- android:orientation="horizontal"
|
|
|
- android:paddingTop="3dp"
|
|
|
- android:paddingBottom="3dp">
|
|
|
-
|
|
|
- <ImageView
|
|
|
- android:layout_width="18sp"
|
|
|
- android:layout_height="18sp"
|
|
|
- android:contentDescription="@string/read_dur_progress"
|
|
|
- android:paddingRight="2dp"
|
|
|
- android:src="@drawable/ic_folder_open"
|
|
|
- app:tint="@color/tv_text_summary"
|
|
|
- tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
-
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_toc"
|
|
|
- android:layout_width="0dp"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_weight="1"
|
|
|
- android:ellipsize="end"
|
|
|
- android:includeFontPadding="false"
|
|
|
- android:paddingRight="6dp"
|
|
|
- android:singleLine="true"
|
|
|
- android:textColor="@color/tv_text_summary"
|
|
|
- android:textSize="13sp"
|
|
|
- tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
|
|
- tools:text="@string/toc_s" />
|
|
|
-
|
|
|
- <io.legado.app.ui.widget.text.AccentBgTextView
|
|
|
- android:id="@+id/tv_toc_view"
|
|
|
- android:layout_width="wrap_content"
|
|
|
- android:layout_height="wrap_content"
|
|
|
- android:layout_marginStart="8dp"
|
|
|
- android:paddingLeft="5dp"
|
|
|
- android:paddingRight="5dp"
|
|
|
- android:text="@string/view_toc"
|
|
|
- android:textSize="13sp"
|
|
|
- app:radius="2dp" />
|
|
|
|
|
|
- </LinearLayout>
|
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
@@ -364,9 +345,8 @@
|
|
|
android:paddingLeft="8dp"
|
|
|
android:paddingBottom="8dp"
|
|
|
android:text="@string/book_intro"
|
|
|
- android:textColor="@color/secondaryText"
|
|
|
android:textIsSelectable="true"
|
|
|
- android:textSize="14sp"
|
|
|
+ android:textSize="16sp"
|
|
|
android:visibility="visible"
|
|
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
|
|
|
|
|
@@ -378,42 +358,36 @@
|
|
|
|
|
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
|
|
|
|
|
- <View
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:layout_height="1px"
|
|
|
- android:background="@color/bg_divider_line" />
|
|
|
-
|
|
|
<LinearLayout
|
|
|
android:id="@+id/fl_action"
|
|
|
android:layout_width="match_parent"
|
|
|
android:layout_height="wrap_content"
|
|
|
- android:background="@color/background_menu"
|
|
|
android:orientation="horizontal"
|
|
|
+ android:padding="12dp"
|
|
|
+ android:background="@color/background_theme"
|
|
|
app:layout_constraintBottom_toBottomOf="parent">
|
|
|
|
|
|
- <TextView
|
|
|
- android:id="@+id/tv_shelf"
|
|
|
+ <com.google.android.material.button.MaterialButton
|
|
|
+ android:id="@+id/btn_shelf"
|
|
|
+ style="@style/Widget.Material3.Button.OutlinedButton"
|
|
|
android:layout_width="0dp"
|
|
|
android:layout_height="50dp"
|
|
|
android:layout_weight="1"
|
|
|
- android:background="?attr/selectableItemBackground"
|
|
|
- android:clickable="true"
|
|
|
- android:focusable="true"
|
|
|
- android:gravity="center"
|
|
|
- android:includeFontPadding="false"
|
|
|
+ android:layout_marginEnd="6dp"
|
|
|
android:text="@string/remove_from_bookshelf"
|
|
|
- android:textColor="@color/primaryText"
|
|
|
- android:textSize="15sp" />
|
|
|
+ android:textSize="15sp"
|
|
|
+ app:iconPadding="0dp" />
|
|
|
|
|
|
- <io.legado.app.ui.widget.text.AccentBgTextView
|
|
|
- android:id="@+id/tv_read"
|
|
|
+ <com.google.android.material.button.MaterialButton
|
|
|
+ android:id="@+id/btn_read"
|
|
|
+ style="@style/Widget.Material3.Button"
|
|
|
android:layout_width="0dp"
|
|
|
android:layout_height="50dp"
|
|
|
android:layout_weight="1"
|
|
|
- android:gravity="center"
|
|
|
- android:includeFontPadding="false"
|
|
|
+ android:layout_marginStart="6dp"
|
|
|
android:text="@string/reading"
|
|
|
- android:textSize="15sp" />
|
|
|
+ android:textSize="15sp"
|
|
|
+ app:iconPadding="0dp" />
|
|
|
|
|
|
</LinearLayout>
|
|
|
|