重做漫画功能,不影响现有逻辑漫画功能 (#4685)
* 增加漫画UI * ... * ... * ... * ... * ... * ... * ... * ... * ... * 完成加载图片人机验证问题 * 完成加载框 * ... * ... * .... * ... * ... * ... * ... * ... * ... * ... * ... * ... * 剔除重复章节 * ... * .... * ... * ... * ... * ... * .... * ... * ... * ... * .... * ... * ... * ... * .... * ... * ... * ... * .... * ... * ... * ... * ... * ... * ... * ... * ... * ... * ... * .... * ... * ... * ... * ... * ... * ... * ... * ... * ... * ... * .... * ... * ... * ... * ... * ... * ... * ... * ... * ... * .... * ... * ... * ... * ... * ... * ... * ... * ... * ... * ... * ...
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<io.legado.app.ui.book.manga.rv.WebtoonFrame 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="match_parent">
|
||||
|
||||
<io.legado.app.ui.book.manga.rv.WebtoonRecyclerView
|
||||
android:id="@+id/mRecyclerMange"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<io.legado.app.ui.widget.ReaderInfoBarView
|
||||
android:id="@+id/infobar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<io.legado.app.ui.book.read.MangaMenu
|
||||
android:id="@+id/mangaMenu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_loading"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ProgressBar
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
app:indicatorColor="@color/white"
|
||||
app:indicatorSize="36dp"
|
||||
app:trackCornerRadius="99dp"
|
||||
app:trackThickness="3dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_loading_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="正在加载中..."
|
||||
android:textColor="@color/black" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_retry"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_msg"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/retry"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="重新加载"
|
||||
android:textSize="18sp"
|
||||
app:cornerRadius="10dp"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</io.legado.app.ui.book.manga.rv.WebtoonFrame>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="96dp"
|
||||
android:background="@color/book_ant_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:textStyle="bold"
|
||||
tools:text="上一章节:第一话" />
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout 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:id="@+id/rootView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/book_ant_10"
|
||||
android:contentDescription="@null">
|
||||
|
||||
<com.github.panpf.zoomimage.GlideZoomImageView
|
||||
android:id="@+id/image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:adjustViewBounds="true"
|
||||
app:contentScale="fillWidth" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/book_ant_10">
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
style="@style/Widget.Material3.CircularProgressIndicator.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminate="true"
|
||||
android:indeterminateTint="@color/white"
|
||||
android:progressTint="@color/white"
|
||||
app:indicatorColor="@color/white"
|
||||
app:indicatorSize="36dp"
|
||||
app:trackCornerRadius="99dp"
|
||||
app:trackThickness="3dp" />
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/retry"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="重新加载"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:visibility="gone"
|
||||
app:backgroundTint="@color/white"
|
||||
app:cornerRadius="10dp"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="0%"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
|
||||
</FrameLayout>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/vw_menu_root"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/vw_menu_bg"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:contentDescription="@string/content"
|
||||
tools:layout_editor_absoluteX="0dp"
|
||||
tools:layout_editor_absoluteY="0dp" />
|
||||
|
||||
<io.legado.app.ui.widget.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:theme="?attr/actionBarStyle"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/title_bar_addition"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_chapter_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tv_source_action"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_chapter_url"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@+id/tv_source_action"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_chapter_name" />
|
||||
|
||||
<io.legado.app.ui.widget.text.AccentBgTextView
|
||||
android:id="@+id/tv_source_action"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="1dp"
|
||||
android:gravity="center"
|
||||
android:maxWidth="120dp"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp"
|
||||
android:text="@string/book_source"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_chapter_url"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:radius="2dp" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</io.legado.app.ui.widget.TitleBar>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,21 @@
|
||||
<menu 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"
|
||||
tools:context=".ui.main.MainActivity"
|
||||
tools:ignore="AlwaysShowAction">
|
||||
|
||||
<group android:id="@+id/menu_group_on_line">
|
||||
<item
|
||||
android:id="@+id/menu_change_source"
|
||||
android:icon="@drawable/ic_exchange"
|
||||
android:title="@string/change_origin"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_catalog"
|
||||
android:icon="@drawable/ic_toc"
|
||||
android:title="@string/chapter_list"
|
||||
app:showAsAction="always" />
|
||||
|
||||
</group>
|
||||
</menu>
|
||||
@@ -1180,6 +1180,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">Descargar el siguiente capítulo</string>
|
||||
<string name="menu_download_all">Descargar todos los capítulos</string>
|
||||
</resources>
|
||||
|
||||
@@ -1183,6 +1183,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">下载之后章节</string>
|
||||
<string name="menu_download_all">下载全部章节</string>
|
||||
</resources>
|
||||
|
||||
@@ -1183,6 +1183,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">Faça o download do próximo capítulo</string>
|
||||
<string name="menu_download_all">Download de todos os capítulos</string>
|
||||
</resources>
|
||||
|
||||
@@ -1179,6 +1179,9 @@ Còn </string>
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">Tải xuống chương tiếp theo</string>
|
||||
<string name="menu_download_all">Tải xuống tất cả các chương</string>
|
||||
</resources>
|
||||
|
||||
@@ -1180,6 +1180,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">下載之後章節</string>
|
||||
<string name="menu_download_all">下載全部章節</string>
|
||||
</resources>
|
||||
|
||||
@@ -1182,6 +1182,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">下載之後章節</string>
|
||||
<string name="menu_download_all">下載全部章節</string>
|
||||
</resources>
|
||||
|
||||
@@ -1182,6 +1182,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">下载之后章节</string>
|
||||
<string name="menu_download_all">下载全部章节</string>
|
||||
</resources>
|
||||
|
||||
@@ -111,4 +111,6 @@
|
||||
<color name="ate_switch_thumb_disabled_dark">#FF424242</color>
|
||||
<!---->
|
||||
<color name="ate_navigation_drawer_selected_dark">#202020</color>
|
||||
|
||||
<color name="book_ant_10">#141414</color>
|
||||
</resources>
|
||||
|
||||
@@ -1183,6 +1183,9 @@
|
||||
<string name="read_aloud_by_media_button_summary">通过耳机按键来启动朗读</string>
|
||||
<string name="show_same_source">显示重复书源</string>
|
||||
<string name="theme_config">主题配置</string>
|
||||
<string name="show_mange_ui">漫画浏览</string>
|
||||
<string name="disable_manga_scaling">禁用漫画缩放</string>
|
||||
<string name="book_reader_info_bar">页数. %1$d/%2$d 章节. %3$d/%4$d -> %5$s%%</string>
|
||||
<string name="menu_download_after">Download the chapter after</string>
|
||||
<string name="menu_download_all">Download all chapter</string>
|
||||
</resources>
|
||||
|
||||
@@ -42,6 +42,18 @@
|
||||
android:title="@string/show_rss"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<io.legado.app.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="showMangaUi"
|
||||
android:title="@string/show_mange_ui"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<io.legado.app.lib.prefs.SwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="disableMangaScaling"
|
||||
android:title="@string/disable_manga_scaling"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<io.legado.app.lib.prefs.NameListPreference
|
||||
android:defaultValue="bookshelf"
|
||||
android:key="defaultHomePage"
|
||||
|
||||
Reference in New Issue
Block a user