mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -138,6 +138,7 @@ object PreferKey {
|
||||
const val defaultHomePage = "defaultHomePage"
|
||||
const val showBookshelfFastScroller = "showBookshelfFastScroller"
|
||||
const val importKeepEnable = "importKeepEnable"
|
||||
const val previewImageByClick = "previewImageByClick"
|
||||
|
||||
const val cPrimary = "colorPrimary"
|
||||
const val cAccent = "colorAccent"
|
||||
|
||||
@@ -426,6 +426,12 @@ object AppConfig : SharedPreferences.OnSharedPreferenceChangeListener {
|
||||
appCtx.putPrefBoolean(PreferKey.importKeepEnable, value)
|
||||
}
|
||||
|
||||
var previewImageByClick: Boolean
|
||||
get() = appCtx.getPrefBoolean(PreferKey.previewImageByClick, false)
|
||||
set(value) {
|
||||
appCtx.putPrefBoolean(PreferKey.previewImageByClick, value)
|
||||
}
|
||||
|
||||
var preDownloadNum
|
||||
get() = appCtx.getPrefInt(PreferKey.preDownloadNum, 10)
|
||||
set(value) {
|
||||
|
||||
@@ -24,6 +24,7 @@ import io.legado.app.ui.book.read.page.entities.TextPos
|
||||
import io.legado.app.ui.book.read.page.entities.column.*
|
||||
import io.legado.app.ui.book.read.page.provider.ChapterProvider
|
||||
import io.legado.app.ui.book.read.page.provider.TextPageFactory
|
||||
import io.legado.app.ui.widget.dialog.PhotoDialog
|
||||
import io.legado.app.utils.*
|
||||
import kotlin.math.min
|
||||
|
||||
@@ -348,6 +349,11 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
|
||||
context.toastOnUi("Button Pressed!")
|
||||
handled = true
|
||||
}
|
||||
|
||||
is ImageColumn -> if (AppConfig.previewImageByClick) {
|
||||
activity?.showDialogFragment(PhotoDialog(column.src))
|
||||
handled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
return handled
|
||||
|
||||
@@ -1132,4 +1132,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1135,4 +1135,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1135,4 +1135,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1130,4 +1130,5 @@ Còn </string>
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1131,4 +1131,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1133,4 +1133,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1133,4 +1133,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -1135,4 +1135,5 @@
|
||||
<string name="show_bookshelf_fast_scroller">显示快速滚动条</string>
|
||||
<string name="export_all_use_book_source">导出所有书的书源</string>
|
||||
<string name="keep_enable">保留启用状态</string>
|
||||
<string name="preview_image_by_click">点击预览图片</string>
|
||||
</resources>
|
||||
|
||||
@@ -143,6 +143,13 @@
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legado.app.lib.prefs.SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="previewImageByClick"
|
||||
android:title="@string/preview_image_by_click"
|
||||
app:iconSpaceReserved="false"
|
||||
app:isBottomBackground="true" />
|
||||
|
||||
<io.legado.app.lib.prefs.Preference
|
||||
android:key="clickRegionalConfig"
|
||||
android:title="@string/click_regional_config"
|
||||
|
||||
Reference in New Issue
Block a user