pull/862/head
gedoor 4 years ago
parent e37f255447
commit 707d0fecf5
  1. 3
      app/src/main/java/io/legado/app/constant/Const.kt
  2. 3
      app/src/main/java/io/legado/app/ui/book/cache/CacheActivity.kt
  3. 3
      app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt

@ -21,6 +21,9 @@ val appInfo: AppInfo by lazy {
appInfo
}
val charsets =
arrayListOf("UTF-8", "GB2312", "GB18030", "GBK", "Unicode", "UTF-16", "UTF-16LE", "ASCII")
data class AppInfo(
var versionCode: Long = 0L,
var versionName: String = ""

@ -14,6 +14,7 @@ import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.AppConst
import io.legado.app.constant.EventBus
import io.legado.app.constant.PreferKey
import io.legado.app.constant.charsets
import io.legado.app.data.appDb
import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter
@ -230,8 +231,6 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>()
}
private fun showCharsetConfig() {
val charsets =
arrayListOf("UTF-8", "GB2312", "GBK", "Unicode", "UTF-16", "UTF-16LE", "ASCII")
alert(R.string.set_charset) {
val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply {
editView.setFilterValues(charsets)

@ -11,6 +11,7 @@ import androidx.core.view.isVisible
import io.legado.app.R
import io.legado.app.base.VMBaseActivity
import io.legado.app.constant.PreferKey
import io.legado.app.constant.charsets
import io.legado.app.data.appDb
import io.legado.app.data.entities.Bookmark
import io.legado.app.databinding.ActivityBookReadBinding
@ -222,8 +223,6 @@ abstract class ReadBookBaseActivity :
}
fun showCharsetConfig() {
val charsets =
arrayListOf("UTF-8", "GB2312", "GBK", "Unicode", "UTF-16", "UTF-16LE", "ASCII")
alert(R.string.set_charset) {
val alertBinding = DialogEditTextBinding.inflate(layoutInflater).apply {
editView.setFilterValues(charsets)

Loading…
Cancel
Save