Update
This commit is contained in:
@@ -1,22 +1,5 @@
|
|||||||
# [English](English.md) [中文](README.md)
|
# [English](English.md) [中文](README.md)
|
||||||
|
|
||||||
[](https://play.google.com/store/apps/details?id=io.legado.play.release)
|
|
||||||
<a href="https://jb.gg/OpenSourceSupport" target="_blank">
|
|
||||||
<img width="24" height="24" src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg?_gl=1*135yekd*_ga*OTY4Mjg4NDYzLjE2Mzk0NTE3MzQ.*_ga_9J976DJZ68*MTY2OTE2MzM5Ny4xMy4wLjE2NjkxNjMzOTcuNjAuMC4w&_ga=2.257292110.451256242.1669085120-968288463.1639451734" alt="idea"/>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
<img width="125" height="125" src="https://github.com/gedoor/legado/raw/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" alt="legado"/>
|
|
||||||
|
|
||||||
Legado / 开源阅读
|
|
||||||
<br>
|
|
||||||
<a href="https://gedoor.github.io" target="_blank">gedoor.github.io</a> / <a href="https://www.legado.top/" target="_blank">legado.top</a>
|
|
||||||
<br>
|
|
||||||
Legado is a free and open source novel reader for Android.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
[](#contents) [](#Function-主要功能-) [](#Community-交流社区-) [](#API-) [](#Other-其他-) [](#Grateful-感谢-) [](#Interface-界面-)
|
|
||||||
|
|
||||||
>注意,此版本为Material Design 3风格重构版本,目前正快速更新。
|
>注意,此版本为Material Design 3风格重构版本,目前正快速更新。
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
@@ -39,9 +22,6 @@ Legado is a free and open source novel reader for Android.
|
|||||||
9.软件开源,持续优化,无广告。
|
9.软件开源,持续优化,无广告。
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
# Community-交流社区 [](#Community-交流社区-)
|
# Community-交流社区 [](#Community-交流社区-)
|
||||||
|
|
||||||
@@ -54,20 +34,6 @@ Legado is a free and open source novel reader for Android.
|
|||||||
#### Other
|
#### Other
|
||||||
https://www.yuque.com/legado/wiki/community
|
https://www.yuque.com/legado/wiki/community
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
# API [](#API-)
|
|
||||||
* 阅读3.0 提供了2种方式的API:`Web方式`和`Content Provider方式`。您可以在[这里](api.md)根据需要自行调用。
|
|
||||||
* 可通过url唤起阅读进行一键导入,url格式: legado://import/{path}?src={url}
|
|
||||||
* path类型: bookSource,rssSource,replaceRule,textTocRule,httpTTS,theme,readConfig,dictRule,[addToBookshelf](/app/src/main/java/io/legado/app/ui/association/AddToBookshelfDialog.kt)
|
|
||||||
* path类型解释: 书源,订阅源,替换规则,本地txt小说目录规则,在线朗读引擎,主题,阅读排版,添加到书架
|
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
# Other-其他 [](#Other-其他-)
|
# Other-其他 [](#Other-其他-)
|
||||||
##### 免责声明
|
##### 免责声明
|
||||||
https://gedoor.github.io/Disclaimer
|
https://gedoor.github.io/Disclaimer
|
||||||
@@ -79,11 +45,12 @@ https://gedoor.github.io/Disclaimer
|
|||||||
* [web端书架](https://github.com/gedoor/legado_web_bookshelf)
|
* [web端书架](https://github.com/gedoor/legado_web_bookshelf)
|
||||||
* [web端源编辑](https://github.com/gedoor/legado_web_source_editor)
|
* [web端源编辑](https://github.com/gedoor/legado_web_source_editor)
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
|
||||||
</a>
|
|
||||||
|
|
||||||
# Grateful-感谢 [](#Grateful-感谢-)
|
# Grateful-感谢 [](#Grateful-感谢-)
|
||||||
|
> * github.com/gedoor/legado
|
||||||
|
> * github.com/komikku-app/komikku
|
||||||
|
> * github.com/FoedusProgramme/Gramophone
|
||||||
|
> *
|
||||||
> * org.jsoup:jsoup
|
> * org.jsoup:jsoup
|
||||||
> * cn.wanghaomiao:JsoupXpath
|
> * cn.wanghaomiao:JsoupXpath
|
||||||
> * com.jayway.jsonpath:json-path
|
> * com.jayway.jsonpath:json-path
|
||||||
@@ -102,11 +69,3 @@ https://gedoor.github.io/Disclaimer
|
|||||||
<a href="#readme">
|
<a href="#readme">
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
# Interface-界面 [](#Interface-界面-)
|
|
||||||
<img src="https://github.com/gedoor/gedoor.github.io/blob/master/static/img/legado/%E9%98%85%E8%AF%BB%E7%AE%80%E4%BB%8B1.jpg" width="270"><img src="https://github.com/gedoor/gedoor.github.io/blob/master/static/img/legado/%E9%98%85%E8%AF%BB%E7%AE%80%E4%BB%8B2.jpg" width="270"><img src="https://github.com/gedoor/gedoor.github.io/blob/master/static/img/legado/%E9%98%85%E8%AF%BB%E7%AE%80%E4%BB%8B3.jpg" width="270">
|
|
||||||
<img src="https://github.com/gedoor/gedoor.github.io/blob/master/static/img/legado/%E9%98%85%E8%AF%BB%E7%AE%80%E4%BB%8B4.jpg" width="270"><img src="https://github.com/gedoor/gedoor.github.io/blob/master/static/img/legado/%E9%98%85%E8%AF%BB%E7%AE%80%E4%BB%8B5.jpg" width="270"><img src="https://github.com/gedoor/gedoor.github.io/blob/master/static/img/legado/%E9%98%85%E8%AF%BB%E7%AE%80%E4%BB%8B6.jpg" width="270">
|
|
||||||
|
|
||||||
<a href="#readme">
|
|
||||||
<img src="https://img.shields.io/badge/-返回顶部-orange.svg" alt="#" align="right">
|
|
||||||
</a>
|
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class BookInfoActivity :
|
|||||||
binding.tvToc.text = getString(R.string.toc_s, getString(R.string.loading))
|
binding.tvToc.text = getString(R.string.toc_s, getString(R.string.loading))
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
||||||
binding.tvIntro.revealOnFocusHint = false
|
binding.tvDetail?.let { it.revealOnFocusHint = false }
|
||||||
}
|
}
|
||||||
|
|
||||||
viewModel.bookData.observe(this) { showBook(it) }
|
viewModel.bookData.observe(this) { showBook(it) }
|
||||||
@@ -297,16 +297,16 @@ class BookInfoActivity :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
|
// override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
|
||||||
if (ev.action == MotionEvent.ACTION_DOWN) {
|
// if (ev.action == MotionEvent.ACTION_DOWN) {
|
||||||
currentFocus?.let {
|
// currentFocus?.let {
|
||||||
if (it === binding.tvIntro && binding.tvIntro.hasSelection()) {
|
// if (it === binding.tvIntro && binding.tvIntro.hasSelection()) {
|
||||||
it.clearFocus()
|
// it.clearFocus()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return super.dispatchTouchEvent(ev)
|
// return super.dispatchTouchEvent(ev)
|
||||||
}
|
// }
|
||||||
|
|
||||||
private fun refreshBook() {
|
private fun refreshBook() {
|
||||||
upLoading(true)
|
upLoading(true)
|
||||||
@@ -343,7 +343,7 @@ class BookInfoActivity :
|
|||||||
tvAuthor.text = getString(R.string.author_show, book.getRealAuthor())
|
tvAuthor.text = getString(R.string.author_show, book.getRealAuthor())
|
||||||
tvOrigin.text = getString(R.string.origin_show, book.originName)
|
tvOrigin.text = getString(R.string.origin_show, book.originName)
|
||||||
tvLasted.text = getString(R.string.lasted_show, book.latestChapterTitle)
|
tvLasted.text = getString(R.string.lasted_show, book.latestChapterTitle)
|
||||||
tvIntro.text = book.getDisplayIntro()
|
tvDetail?.let { it.text = book.getDisplayIntro() }
|
||||||
llToc?.visible(!book.isWebFile)
|
llToc?.visible(!book.isWebFile)
|
||||||
upTvBookshelf()
|
upTvBookshelf()
|
||||||
upKinds(book)
|
upKinds(book)
|
||||||
@@ -366,7 +366,9 @@ class BookInfoActivity :
|
|||||||
lbKind.gone()
|
lbKind.gone()
|
||||||
} else {
|
} else {
|
||||||
lbKind.visible()
|
lbKind.visible()
|
||||||
lbKind.setLabels(kinds)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
|
||||||
|
lbKind.setLabels(kinds)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import android.view.animation.Interpolator
|
|||||||
import android.widget.OverScroller
|
import android.widget.OverScroller
|
||||||
import androidx.appcompat.widget.AppCompatTextView
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
|
import com.google.android.material.textview.MaterialTextView
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
@@ -21,7 +22,7 @@ import kotlin.math.min
|
|||||||
* 嵌套惯性滚动 TextView
|
* 嵌套惯性滚动 TextView
|
||||||
*/
|
*/
|
||||||
class ScrollTextView(context: Context, attrs: AttributeSet?) :
|
class ScrollTextView(context: Context, attrs: AttributeSet?) :
|
||||||
AppCompatTextView(context, attrs) {
|
MaterialTextView(context, attrs) {
|
||||||
|
|
||||||
//是否到顶或者到底的标志
|
//是否到顶或者到底的标志
|
||||||
private var disallowIntercept = true
|
private var disallowIntercept = true
|
||||||
|
|||||||
@@ -207,6 +207,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</HorizontalScrollView>
|
</HorizontalScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -287,7 +288,7 @@
|
|||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:paddingRight="6dp"
|
android:paddingRight="6dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="13sp"
|
android:textSize="14sp"
|
||||||
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
||||||
tools:text="@string/read_dur_progress" />
|
tools:text="@string/read_dur_progress" />
|
||||||
|
|
||||||
@@ -318,7 +319,7 @@
|
|||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:paddingRight="6dp"
|
android:paddingRight="6dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textSize="13sp"
|
android:textSize="14sp"
|
||||||
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry"
|
||||||
tools:text="@string/group_s" />
|
tools:text="@string/group_s" />
|
||||||
|
|
||||||
@@ -336,8 +337,8 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<io.legado.app.ui.widget.text.ScrollTextView
|
<TextView
|
||||||
android:id="@+id/tv_intro"
|
android:id="@+id/tv_detail"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
@@ -346,9 +347,10 @@
|
|||||||
android:minHeight="48dp"
|
android:minHeight="48dp"
|
||||||
android:paddingLeft="8dp"
|
android:paddingLeft="8dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
|
android:lineSpacingExtra="4dp"
|
||||||
android:text="@string/book_intro"
|
android:text="@string/book_intro"
|
||||||
android:textIsSelectable="true"
|
android:textIsSelectable="true"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,19 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
tools:ignore="ImageContrastCheck" />
|
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_constraintTop_toTopOf="@id/iv_cover"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/iv_cover"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/iv_cover" />
|
||||||
|
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:id="@+id/cd_unread"
|
android:id="@+id/cd_unread"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@@ -65,15 +78,6 @@
|
|||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<!-- 加载指示器 -->
|
|
||||||
<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>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<!-- 书名 -->
|
<!-- 书名 -->
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="2dp"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/labelText"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingHorizontal="8dp"
|
||||||
|
android:paddingVertical="4dp"
|
||||||
|
android:textSize="12sp" />
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
Reference in New Issue
Block a user