Language name in extension setting (#111)
* Full language name in ext settings * added more lang name * changed alter dialog view * sort language by names * 3x grid for 360DP mobiles * Default novel settings * Oled for LN * Lang full name * Notification icon changed to dantotsu * Remember 'sort' value
This commit is contained in:
parent
ef30869b62
commit
4286232d17
21 changed files with 1487 additions and 649 deletions
|
@ -1,6 +1,7 @@
|
|||
package ani.dantotsu.connections.anilist
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.checkGenreTime
|
||||
import ani.dantotsu.checkId
|
||||
|
@ -410,8 +411,9 @@ class AnilistQueries {
|
|||
sorted["Favourites"]?.sortWith(compareBy { it.userFavOrder })
|
||||
|
||||
sorted["All"] = all
|
||||
|
||||
val sort = sortOrder ?: options?.rowOrder
|
||||
val listsort = currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
|
||||
?.getString("sort_order", "score")
|
||||
val sort = listsort ?: sortOrder ?: options?.rowOrder
|
||||
for (i in sorted.keys) {
|
||||
when (sort) {
|
||||
"score" -> sorted[i]?.sortWith { b, a ->
|
||||
|
|
|
@ -78,7 +78,7 @@ class SearchActivity : AppCompatActivity() {
|
|||
mediaAdaptor = MediaAdaptor(style, model.searchResults.results, this, matchParent = true)
|
||||
val headerAdaptor = SearchAdapter(this)
|
||||
|
||||
val gridSize = (screenWidth / 124f).toInt()
|
||||
val gridSize = (screenWidth / 120f).toInt()
|
||||
val gridLayoutManager = GridLayoutManager(this, gridSize)
|
||||
gridLayoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() {
|
||||
override fun getSpanSize(position: Int): Int {
|
||||
|
|
|
@ -395,7 +395,7 @@ class AnimeWatchAdapter(
|
|||
val adapter = ArrayAdapter(
|
||||
fragment.requireContext(),
|
||||
R.layout.item_dropdown,
|
||||
parser.extension.sources.map { LanguageMapper.mapLanguageCodeToName(it.lang) }
|
||||
parser.extension.sources.sortedBy { it.lang }.map { LanguageMapper.mapLanguageCodeToName(it.lang) }
|
||||
)
|
||||
val items = adapter.count
|
||||
if (items > 1) binding?.animeSourceLanguageContainer?.visibility = View.VISIBLE else binding?.animeSourceLanguageContainer?.visibility = View.GONE
|
||||
|
|
|
@ -23,6 +23,7 @@ import ani.dantotsu.databinding.FragmentAnimeWatchBinding
|
|||
import ani.dantotsu.media.Media
|
||||
import ani.dantotsu.media.MediaDetailsActivity
|
||||
import ani.dantotsu.media.MediaDetailsViewModel
|
||||
import ani.dantotsu.others.LanguageMapper
|
||||
import ani.dantotsu.parsers.AnimeParser
|
||||
import ani.dantotsu.parsers.AnimeSources
|
||||
import ani.dantotsu.parsers.HAnimeSources
|
||||
|
@ -314,19 +315,19 @@ class AnimeWatchFragment : Fragment() {
|
|||
if (show) View.GONE else View.VISIBLE
|
||||
}
|
||||
}
|
||||
var itemSelected = false
|
||||
val allSettings = pkg.sources.filterIsInstance<ConfigurableAnimeSource>()
|
||||
if (allSettings.isNotEmpty()) {
|
||||
var selectedSetting = allSettings[0]
|
||||
if (allSettings.size > 1) {
|
||||
val names = allSettings.map { it.lang }.toTypedArray()
|
||||
val names = allSettings.sortedBy { it.lang }.map { LanguageMapper.mapLanguageCodeToName(it.lang) }.toTypedArray()
|
||||
var selectedIndex = 0
|
||||
val dialog = AlertDialog.Builder(requireContext())
|
||||
val dialog = AlertDialog.Builder(requireContext() , R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
|
||||
selectedIndex = which
|
||||
}
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
selectedSetting = allSettings[selectedIndex]
|
||||
itemSelected = true
|
||||
dialog.dismiss()
|
||||
|
||||
// Move the fragment transaction here
|
||||
|
@ -343,10 +344,10 @@ class AnimeWatchFragment : Fragment() {
|
|||
.commit()
|
||||
}
|
||||
}
|
||||
.setNegativeButton("Cancel") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
.setOnDismissListener {
|
||||
if (!itemSelected) {
|
||||
changeUIVisibility(true)
|
||||
return@setNegativeButton
|
||||
}
|
||||
}
|
||||
.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
|
|
|
@ -425,7 +425,7 @@ class MangaReadAdapter(
|
|||
val adapter = ArrayAdapter(
|
||||
fragment.requireContext(),
|
||||
R.layout.item_dropdown,
|
||||
parser.extension.sources.map { LanguageMapper.mapLanguageCodeToName(it.lang) }
|
||||
parser.extension.sources.sortedBy { it.lang }.map { LanguageMapper.mapLanguageCodeToName(it.lang) }
|
||||
)
|
||||
val items = adapter.count
|
||||
if (items > 1) binding?.animeSourceLanguageContainer?.visibility = View.VISIBLE else binding?.animeSourceLanguageContainer?.visibility = View.GONE
|
||||
|
|
|
@ -37,6 +37,7 @@ import ani.dantotsu.media.Media
|
|||
import ani.dantotsu.media.MediaDetailsActivity
|
||||
import ani.dantotsu.media.MediaDetailsViewModel
|
||||
import ani.dantotsu.media.manga.mangareader.ChapterLoaderDialog
|
||||
import ani.dantotsu.others.LanguageMapper
|
||||
import ani.dantotsu.parsers.DynamicMangaParser
|
||||
import ani.dantotsu.parsers.HMangaSources
|
||||
import ani.dantotsu.parsers.MangaParser
|
||||
|
@ -357,19 +358,19 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
|||
if (show) View.GONE else View.VISIBLE
|
||||
}
|
||||
}
|
||||
var itemSelected = false
|
||||
val allSettings = pkg.sources.filterIsInstance<ConfigurableSource>()
|
||||
if (allSettings.isNotEmpty()) {
|
||||
var selectedSetting = allSettings[0]
|
||||
if (allSettings.size > 1) {
|
||||
val names = allSettings.map { it.lang }.toTypedArray()
|
||||
val names = allSettings.sortedBy { it.lang }.map { LanguageMapper.mapLanguageCodeToName(it.lang) }.toTypedArray()
|
||||
var selectedIndex = 0
|
||||
val dialog = AlertDialog.Builder(requireContext())
|
||||
val dialog = AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
.setSingleChoiceItems(names, selectedIndex) { _, which ->
|
||||
.setSingleChoiceItems(names, selectedIndex) { dialog, which ->
|
||||
selectedIndex = which
|
||||
}
|
||||
.setPositiveButton("OK") { dialog, _ ->
|
||||
selectedSetting = allSettings[selectedIndex]
|
||||
itemSelected = true
|
||||
dialog.dismiss()
|
||||
|
||||
// Move the fragment transaction here
|
||||
|
@ -384,10 +385,10 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
|||
.addToBackStack(null)
|
||||
.commit()
|
||||
}
|
||||
.setNegativeButton("Cancel") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
.setOnDismissListener {
|
||||
if (!itemSelected) {
|
||||
changeUIVisibility(true)
|
||||
return@setNegativeButton
|
||||
}
|
||||
}
|
||||
.show()
|
||||
dialog.window?.setDimAmount(0.8f)
|
||||
|
|
|
@ -36,7 +36,7 @@ import ani.dantotsu.saveData
|
|||
import ani.dantotsu.setSafeOnClickListener
|
||||
import ani.dantotsu.settings.CurrentNovelReaderSettings
|
||||
import ani.dantotsu.settings.CurrentReaderSettings
|
||||
import ani.dantotsu.settings.NovelReaderSettings
|
||||
import ani.dantotsu.settings.ReaderSettings
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.snackString
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
|
@ -62,7 +62,7 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
private lateinit var binding: ActivityNovelReaderBinding
|
||||
private val scope = lifecycleScope
|
||||
|
||||
lateinit var settings: NovelReaderSettings
|
||||
lateinit var settings: ReaderSettings
|
||||
private lateinit var uiSettings: UserInterfaceSettings
|
||||
|
||||
private var notchHeight: Int? = null
|
||||
|
@ -159,9 +159,8 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
ThemeManager(this).applyTheme()
|
||||
binding = ActivityNovelReaderBinding.inflate(layoutInflater)
|
||||
setContentView(binding.root)
|
||||
|
||||
settings = loadData("novel_reader_settings", this)
|
||||
?: NovelReaderSettings().apply { saveData("novel_reader_settings", this) }
|
||||
settings = loadData("reader_settings", this)
|
||||
?: ReaderSettings().apply { saveData("reader_settings", this) }
|
||||
uiSettings = loadData("ui_settings", this)
|
||||
?: UserInterfaceSettings().also { saveData("ui_settings", it) }
|
||||
|
||||
|
@ -271,7 +270,7 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
binding.bookReader.getAppearance {
|
||||
currentTheme = it
|
||||
themes.add(0, it)
|
||||
settings.default = loadData("${sanitizedBookId}_current_settings") ?: settings.default
|
||||
settings.defaultLN = loadData("${sanitizedBookId}_current_settings") ?: settings.defaultLN
|
||||
applySettings()
|
||||
}
|
||||
|
||||
|
@ -323,7 +322,7 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
return when (event.keyCode) {
|
||||
KeyEvent.KEYCODE_VOLUME_UP, KeyEvent.KEYCODE_DPAD_UP, KeyEvent.KEYCODE_PAGE_UP -> {
|
||||
if (event.keyCode == KeyEvent.KEYCODE_VOLUME_UP)
|
||||
if (!settings.default.volumeButtons)
|
||||
if (!settings.defaultLN.volumeButtons)
|
||||
return false
|
||||
if (event.action == KeyEvent.ACTION_DOWN) {
|
||||
onVolumeUp?.invoke()
|
||||
|
@ -333,7 +332,7 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
|
||||
KeyEvent.KEYCODE_VOLUME_DOWN, KeyEvent.KEYCODE_DPAD_DOWN, KeyEvent.KEYCODE_PAGE_DOWN -> {
|
||||
if (event.keyCode == KeyEvent.KEYCODE_VOLUME_DOWN)
|
||||
if (!settings.default.volumeButtons)
|
||||
if (!settings.defaultLN.volumeButtons)
|
||||
return false
|
||||
if (event.action == KeyEvent.ACTION_DOWN) {
|
||||
onVolumeDown?.invoke()
|
||||
|
@ -349,13 +348,18 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
|
||||
|
||||
fun applySettings() {
|
||||
saveData("${sanitizedBookId}_current_settings", settings.default)
|
||||
saveData("${sanitizedBookId}_current_settings", settings.defaultLN)
|
||||
hideBars()
|
||||
|
||||
if(settings.defaultLN.useOledTheme) {
|
||||
themes.forEach { theme ->
|
||||
theme.darkBg = Color.parseColor("#000000")
|
||||
}
|
||||
}
|
||||
currentTheme =
|
||||
themes.first { it.name.equals(settings.default.currentThemeName, ignoreCase = true) }
|
||||
themes.first { it.name.equals(settings.defaultLN.currentThemeName, ignoreCase = true) }
|
||||
|
||||
when (settings.default.layout) {
|
||||
when (settings.defaultLN.layout) {
|
||||
CurrentNovelReaderSettings.Layouts.PAGED -> {
|
||||
currentTheme?.flow = ReaderFlow.PAGINATED
|
||||
}
|
||||
|
@ -366,22 +370,22 @@ class NovelReaderActivity : AppCompatActivity(), EbookReaderEventListener {
|
|||
}
|
||||
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
|
||||
when (settings.default.dualPageMode) {
|
||||
when (settings.defaultLN.dualPageMode) {
|
||||
CurrentReaderSettings.DualPageModes.No -> currentTheme?.maxColumnCount = 1
|
||||
CurrentReaderSettings.DualPageModes.Automatic -> currentTheme?.maxColumnCount = 2
|
||||
CurrentReaderSettings.DualPageModes.Force -> requestedOrientation =
|
||||
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
}
|
||||
|
||||
currentTheme?.lineHeight = settings.default.lineHeight
|
||||
currentTheme?.gap = settings.default.margin
|
||||
currentTheme?.maxInlineSize = settings.default.maxInlineSize
|
||||
currentTheme?.maxBlockSize = settings.default.maxBlockSize
|
||||
currentTheme?.useDark = settings.default.useDarkTheme
|
||||
currentTheme?.lineHeight = settings.defaultLN.lineHeight
|
||||
currentTheme?.gap = settings.defaultLN.margin
|
||||
currentTheme?.maxInlineSize = settings.defaultLN.maxInlineSize
|
||||
currentTheme?.maxBlockSize = settings.defaultLN.maxBlockSize
|
||||
currentTheme?.useDark = settings.defaultLN.useDarkTheme
|
||||
|
||||
currentTheme?.let { binding.bookReader.setAppearance(it) }
|
||||
|
||||
if (settings.default.keepScreenOn) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
if (settings.defaultLN.keepScreenOn) window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
else window.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@ class NovelReaderSettingsDialogFragment : BottomSheetDialogFragment() {
|
|||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
val activity = requireActivity() as NovelReaderActivity
|
||||
val settings = activity.settings.default
|
||||
|
||||
val settings = activity.settings.defaultLN
|
||||
val themeLabels = activity.themes.map { it.name }
|
||||
binding.themeSelect.adapter =
|
||||
NoPaddingArrayAdapter(activity, R.layout.item_dropdown, themeLabels)
|
||||
|
@ -49,7 +48,11 @@ class NovelReaderSettingsDialogFragment : BottomSheetDialogFragment() {
|
|||
|
||||
override fun onNothingSelected(parent: AdapterView<*>?) {}
|
||||
}
|
||||
|
||||
binding.useOledTheme.isChecked = settings.useOledTheme
|
||||
binding.useOledTheme.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.useOledTheme = isChecked
|
||||
activity.applySettings()
|
||||
}
|
||||
val layoutList = listOf(
|
||||
binding.paged,
|
||||
binding.continuous
|
||||
|
@ -173,6 +176,20 @@ class NovelReaderSettingsDialogFragment : BottomSheetDialogFragment() {
|
|||
binding.maxBlockSize.setText(value.toString())
|
||||
activity.applySettings()
|
||||
}
|
||||
|
||||
}
|
||||
binding.incrementMaxBlockSize.setOnClickListener {
|
||||
val value = binding.maxBlockSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.maxBlockSize = value + 10
|
||||
binding.maxBlockSize.setText(settings.maxBlockSize.toString())
|
||||
activity.applySettings()
|
||||
}
|
||||
|
||||
binding.decrementMaxBlockSize.setOnClickListener {
|
||||
val value = binding.maxBlockSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.maxBlockSize = value - 10
|
||||
binding.maxBlockSize.setText(settings.maxBlockSize.toString())
|
||||
activity.applySettings()
|
||||
}
|
||||
|
||||
binding.useDarkTheme.isChecked = settings.useDarkTheme
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ani.dantotsu.media.user
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.View
|
||||
|
@ -14,9 +15,11 @@ import androidx.lifecycle.MutableLiveData
|
|||
import androidx.lifecycle.lifecycleScope
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.Refresh
|
||||
import ani.dantotsu.currContext
|
||||
import ani.dantotsu.databinding.ActivityListBinding
|
||||
import ani.dantotsu.loadData
|
||||
import ani.dantotsu.others.LangSet
|
||||
import ani.dantotsu.saveData
|
||||
import ani.dantotsu.settings.UserInterfaceSettings
|
||||
import ani.dantotsu.themes.ThemeManager
|
||||
import com.google.android.material.tabs.TabLayout
|
||||
|
@ -144,7 +147,8 @@ class ListActivity : AppCompatActivity() {
|
|||
R.id.release -> "release"
|
||||
else -> null
|
||||
}
|
||||
|
||||
currContext()?.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)?.edit()
|
||||
?.putString("sort_order", sort)?.apply()
|
||||
binding.listProgressBar.visibility = View.VISIBLE
|
||||
binding.listViewPager.adapter = null
|
||||
scope.launch {
|
||||
|
|
|
@ -46,7 +46,7 @@ class ListFragment : Fragment() {
|
|||
binding.listRecyclerView.layoutManager =
|
||||
GridLayoutManager(
|
||||
requireContext(),
|
||||
if (grid!!) (screenWidth / 124f).toInt() else 1
|
||||
if (grid!!) (screenWidth / 120f).toInt() else 1
|
||||
)
|
||||
binding.listRecyclerView.adapter = adapter
|
||||
}
|
||||
|
|
|
@ -6,52 +6,115 @@ class LanguageMapper {
|
|||
fun mapLanguageCodeToName(code: String): String {
|
||||
return when (code) {
|
||||
"all" -> "Multi"
|
||||
"af" -> "Afrikaans"
|
||||
"am" -> "Amharic"
|
||||
"ar" -> "Arabic"
|
||||
"as" -> "Assamese"
|
||||
"az" -> "Azerbaijani"
|
||||
"be" -> "Belarusian"
|
||||
"bg" -> "Bulgarian"
|
||||
"bn" -> "Bengali"
|
||||
"bs" -> "Bosnian"
|
||||
"ca" -> "Catalan"
|
||||
"ceb" -> "Cebuano"
|
||||
"cs" -> "Czech"
|
||||
"da" -> "Danish"
|
||||
"de" -> "German"
|
||||
"el" -> "Greek"
|
||||
"en" -> "English"
|
||||
"en-Us" -> "English (United States)"
|
||||
"eo" -> "Esperanto"
|
||||
"es" -> "Spanish"
|
||||
"es-419" -> "Spanish (Latin America)"
|
||||
"et" -> "Estonian"
|
||||
"eu" -> "Basque"
|
||||
"fa" -> "Persian"
|
||||
"fi" -> "Finnish"
|
||||
"fil" -> "Filipino"
|
||||
"fo" -> "Faroese"
|
||||
"fr" -> "French"
|
||||
"ga" -> "Irish"
|
||||
"gn" -> "Guarani"
|
||||
"gu" -> "Gujarati"
|
||||
"ha" -> "Hausa"
|
||||
"he" -> "Hebrew"
|
||||
"hi" -> "Hindi"
|
||||
"hr" -> "Croatian"
|
||||
"ht" -> "Haitian Creole"
|
||||
"hu" -> "Hungarian"
|
||||
"hy" -> "Armenian"
|
||||
"id" -> "Indonesian"
|
||||
"ig" -> "Igbo"
|
||||
"is" -> "Icelandic"
|
||||
"it" -> "Italian"
|
||||
"ja" -> "Japanese"
|
||||
"jv" -> "Javanese"
|
||||
"ka" -> "Georgian"
|
||||
"kk" -> "Kazakh"
|
||||
"km" -> "Khmer"
|
||||
"kn" -> "Kannada"
|
||||
"ko" -> "Korean"
|
||||
"pl" -> "Polish"
|
||||
"pt-BR" -> "Portuguese (Brazil)"
|
||||
"ru" -> "Russian"
|
||||
"th" -> "Thai"
|
||||
"tr" -> "Turkish"
|
||||
"uk" -> "Ukrainian"
|
||||
"vi" -> "Vietnamese"
|
||||
"zh" -> "Chinese"
|
||||
"zh-Hans" -> "Chinese (Simplified)"
|
||||
"es-419" -> "Spanish (Latin America)"
|
||||
"hu" -> "Hungarian"
|
||||
"zh-habt" -> "Chinese (Hakka)"
|
||||
"zh-hant" -> "Chinese (Traditional)"
|
||||
"ca" -> "Catalan"
|
||||
"bg" -> "Bulgarian"
|
||||
"fa" -> "Persian"
|
||||
"mn" -> "Mongolian"
|
||||
"ro" -> "Romanian"
|
||||
"he" -> "Hebrew"
|
||||
"ms" -> "Malay"
|
||||
"tl" -> "Tagalog"
|
||||
"hi" -> "Hindi"
|
||||
"my" -> "Burmese"
|
||||
"cs" -> "Czech"
|
||||
"pt" -> "Portuguese"
|
||||
"nl" -> "Dutch"
|
||||
"sv" -> "Swedish"
|
||||
"bn" -> "Bengali"
|
||||
"no" -> "Norwegian"
|
||||
"el" -> "Greek"
|
||||
"sr" -> "Serbian"
|
||||
"da" -> "Danish"
|
||||
"ku" -> "Kurdish"
|
||||
"ky" -> "Kyrgyz"
|
||||
"la" -> "Latin"
|
||||
"lb" -> "Luxembourgish"
|
||||
"lo" -> "Lao"
|
||||
"lt" -> "Lithuanian"
|
||||
"lv" -> "Latvian"
|
||||
"mg" -> "Malagasy"
|
||||
"mi" -> "Maori"
|
||||
"mk" -> "Macedonian"
|
||||
"ml" -> "Malayalam"
|
||||
"mn" -> "Mongolian"
|
||||
"mo" -> "Moldovan"
|
||||
"mr" -> "Marathi"
|
||||
"ms" -> "Malay"
|
||||
"mt" -> "Maltese"
|
||||
"my" -> "Burmese"
|
||||
"ne" -> "Nepali"
|
||||
"nl" -> "Dutch"
|
||||
"no" -> "Norwegian"
|
||||
"ny" -> "Chichewa"
|
||||
"pl" -> "Polish"
|
||||
"pt" -> "Portuguese"
|
||||
"pt-BR" -> "Portuguese (Brazil)"
|
||||
"pt-PT" -> "Portuguese (Portugal)"
|
||||
"ps" -> "Pashto"
|
||||
"ro" -> "Romanian"
|
||||
"rm" -> "Romansh"
|
||||
"ru" -> "Russian"
|
||||
"sd" -> "Sindhi"
|
||||
"sh" -> "Serbo-Croatian"
|
||||
"si" -> "Sinhala"
|
||||
"sk" -> "Slovak"
|
||||
"sl" -> "Slovenian"
|
||||
"sm" -> "Samoan"
|
||||
"sn" -> "Shona"
|
||||
"so" -> "Somali"
|
||||
"sq" -> "Albanian"
|
||||
"sr" -> "Serbian"
|
||||
"st" -> "Southern Sotho"
|
||||
"sv" -> "Swedish"
|
||||
"sw" -> "Swahili"
|
||||
"ta" -> "Tamil"
|
||||
"te" -> "Telugu"
|
||||
"tg" -> "Tajik"
|
||||
"th" -> "Thai"
|
||||
"ti" -> "Tigrinya"
|
||||
"tk" -> "Turkmen"
|
||||
"tl" -> "Tagalog"
|
||||
"to" -> "Tongan"
|
||||
"tr" -> "Turkish"
|
||||
"uk" -> "Ukrainian"
|
||||
"ur" -> "Urdu"
|
||||
"uz" -> "Uzbek"
|
||||
"vi" -> "Vietnamese"
|
||||
"yo" -> "Yoruba"
|
||||
"zh" -> "Chinese"
|
||||
"zh-Hans" -> "Chinese (Simplified)"
|
||||
"zh-Hant" -> "Chinese (Traditional)"
|
||||
"zh-Habt" -> "Chinese (Hakka)"
|
||||
"zu" -> "Zulu"
|
||||
else -> code
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ data class CurrentNovelReaderSettings(
|
|||
var justify: Boolean = true,
|
||||
var hyphenation: Boolean = true,
|
||||
var useDarkTheme: Boolean = false,
|
||||
var useOledTheme: Boolean = false,
|
||||
var invert: Boolean = false,
|
||||
var maxInlineSize: Int = 720,
|
||||
var maxBlockSize: Int = 1440,
|
||||
|
|
|
@ -67,7 +67,7 @@ class InstalledAnimeExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
if (allSettings.isNotEmpty()) {
|
||||
var selectedSetting = allSettings[0]
|
||||
if (allSettings.size > 1) {
|
||||
val names = allSettings.map { it.lang }.toTypedArray()
|
||||
val names = allSettings.sortedBy { it.lang }.map { LanguageMapper.mapLanguageCodeToName(it.lang) }.toTypedArray()
|
||||
var selectedIndex = 0
|
||||
val dialog = AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
|
|
|
@ -64,7 +64,7 @@ class InstalledMangaExtensionsFragment : Fragment(), SearchQueryHandler {
|
|||
if (allSettings.isNotEmpty()) {
|
||||
var selectedSetting = allSettings[0]
|
||||
if (allSettings.size > 1) {
|
||||
val names = allSettings.map { it.lang }.toTypedArray()
|
||||
val names = allSettings.sortedBy { it.lang }.map { LanguageMapper.mapLanguageCodeToName(it.lang) }.toTypedArray()
|
||||
var selectedIndex = 0
|
||||
val dialog = AlertDialog.Builder(requireContext(), R.style.MyPopup)
|
||||
.setTitle("Select a Source")
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
package ani.dantotsu.settings
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
data class NovelReaderSettings(
|
||||
var showSource: Boolean = true,
|
||||
var showSystemBars: Boolean = false,
|
||||
var default: CurrentNovelReaderSettings = CurrentNovelReaderSettings(),
|
||||
var askIndividual: Boolean = true,
|
||||
) : Serializable
|
|
@ -8,6 +8,7 @@ data class ReaderSettings(
|
|||
|
||||
var autoDetectWebtoon: Boolean = true,
|
||||
var default: CurrentReaderSettings = CurrentReaderSettings(),
|
||||
var defaultLN: CurrentNovelReaderSettings = CurrentNovelReaderSettings(),
|
||||
|
||||
var askIndividual: Boolean = true,
|
||||
var updateForH: Boolean = false
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
package ani.dantotsu.settings
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.AdapterView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.view.updateLayoutParams
|
||||
import ani.dantotsu.NoPaddingArrayAdapter
|
||||
import ani.dantotsu.R
|
||||
import ani.dantotsu.databinding.ActivityReaderSettingsBinding
|
||||
import ani.dantotsu.initActivity
|
||||
import ani.dantotsu.loadData
|
||||
import ani.dantotsu.media.novel.novelreader.NovelReaderActivity
|
||||
import ani.dantotsu.navBarHeight
|
||||
import ani.dantotsu.others.LangSet
|
||||
import ani.dantotsu.saveData
|
||||
|
@ -42,7 +46,7 @@ class ReaderSettingsActivity : AppCompatActivity() {
|
|||
onBackPressedDispatcher.onBackPressed()
|
||||
}
|
||||
|
||||
//General
|
||||
//Manga Settings
|
||||
binding.readerSettingsSourceName.isChecked = settings.showSource
|
||||
binding.readerSettingsSourceName.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.showSource = isChecked
|
||||
|
@ -54,14 +58,14 @@ class ReaderSettingsActivity : AppCompatActivity() {
|
|||
settings.showSystemBars = isChecked
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
//Default Manga
|
||||
binding.readerSettingsAutoWebToon.isChecked = settings.autoDetectWebtoon
|
||||
binding.readerSettingsAutoWebToon.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.autoDetectWebtoon = isChecked
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
//Default
|
||||
|
||||
val layoutList = listOf(
|
||||
binding.readerSettingsPaged,
|
||||
binding.readerSettingsContinuousPaged,
|
||||
|
@ -185,6 +189,169 @@ class ReaderSettingsActivity : AppCompatActivity() {
|
|||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
//LN settings
|
||||
val layoutListLN = listOf(
|
||||
binding.LNpaged,
|
||||
binding.LNcontinuous
|
||||
)
|
||||
|
||||
binding.LNlayoutText.text = settings.defaultLN.layout.string
|
||||
var selectedLN = layoutListLN[settings.defaultLN.layout.ordinal]
|
||||
selectedLN.alpha = 1f
|
||||
|
||||
layoutListLN.forEachIndexed { index, imageButton ->
|
||||
imageButton.setOnClickListener {
|
||||
selectedLN.alpha = 0.33f
|
||||
selectedLN = imageButton
|
||||
selectedLN.alpha = 1f
|
||||
settings.defaultLN.layout = CurrentNovelReaderSettings.Layouts[index]
|
||||
?: CurrentNovelReaderSettings.Layouts.PAGED
|
||||
binding.LNlayoutText.text = settings.defaultLN.layout.string
|
||||
saveData(reader, settings)
|
||||
}
|
||||
}
|
||||
|
||||
val dualListLN = listOf(
|
||||
binding.LNdualNo,
|
||||
binding.LNdualAuto,
|
||||
binding.LNdualForce
|
||||
)
|
||||
|
||||
binding.LNdualPageText.text = settings.defaultLN.dualPageMode.toString()
|
||||
var selectedDualLN = dualListLN[settings.defaultLN.dualPageMode.ordinal]
|
||||
selectedDualLN.alpha = 1f
|
||||
|
||||
dualListLN.forEachIndexed { index, imageButton ->
|
||||
imageButton.setOnClickListener {
|
||||
selectedDualLN.alpha = 0.33f
|
||||
selectedDualLN = imageButton
|
||||
selectedDualLN.alpha = 1f
|
||||
settings.defaultLN.dualPageMode = CurrentReaderSettings.DualPageModes[index]
|
||||
?: CurrentReaderSettings.DualPageModes.Automatic
|
||||
binding.LNdualPageText.text = settings.defaultLN.dualPageMode.toString()
|
||||
saveData(reader, settings)
|
||||
}
|
||||
}
|
||||
|
||||
binding.LNlineHeight.setText(settings.defaultLN.lineHeight.toString())
|
||||
binding.LNlineHeight.setOnFocusChangeListener { _, hasFocus ->
|
||||
if (!hasFocus) {
|
||||
val value = binding.LNlineHeight.text.toString().toFloatOrNull() ?: 1.4f
|
||||
settings.defaultLN.lineHeight = value
|
||||
binding.LNlineHeight.setText(value.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
}
|
||||
|
||||
binding.LNincrementLineHeight.setOnClickListener {
|
||||
val value = binding.LNlineHeight.text.toString().toFloatOrNull() ?: 1.4f
|
||||
settings.defaultLN.lineHeight = value + 0.1f
|
||||
binding.LNlineHeight.setText(settings.defaultLN.lineHeight.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNdecrementLineHeight.setOnClickListener {
|
||||
val value = binding.LNlineHeight.text.toString().toFloatOrNull() ?: 1.4f
|
||||
settings.defaultLN.lineHeight = value - 0.1f
|
||||
binding.LNlineHeight.setText(settings.defaultLN.lineHeight.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNmargin.setText(settings.defaultLN.margin.toString())
|
||||
binding.LNmargin.setOnFocusChangeListener { _, hasFocus ->
|
||||
if (!hasFocus) {
|
||||
val value = binding.LNmargin.text.toString().toFloatOrNull() ?: 0.06f
|
||||
settings.defaultLN.margin = value
|
||||
binding.LNmargin.setText(value.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
}
|
||||
|
||||
binding.LNincrementMargin.setOnClickListener {
|
||||
val value = binding.LNmargin.text.toString().toFloatOrNull() ?: 0.06f
|
||||
settings.defaultLN.margin = value + 0.01f
|
||||
binding.LNmargin.setText(settings.defaultLN.margin.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNdecrementMargin.setOnClickListener {
|
||||
val value = binding.LNmargin.text.toString().toFloatOrNull() ?: 0.06f
|
||||
settings.defaultLN.margin = value - 0.01f
|
||||
binding.LNmargin.setText(settings.defaultLN.margin.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNmaxInlineSize.setText(settings.defaultLN.maxInlineSize.toString())
|
||||
binding.LNmaxInlineSize.setOnFocusChangeListener { _, hasFocus ->
|
||||
if (!hasFocus) {
|
||||
val value = binding.LNmaxInlineSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.defaultLN.maxInlineSize = value
|
||||
binding.LNmaxInlineSize.setText(value.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
}
|
||||
|
||||
binding.LNincrementMaxInlineSize.setOnClickListener {
|
||||
val value = binding.LNmaxInlineSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.defaultLN.maxInlineSize = value + 10
|
||||
binding.LNmaxInlineSize.setText(settings.defaultLN.maxInlineSize.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNdecrementMaxInlineSize.setOnClickListener {
|
||||
val value = binding.LNmaxInlineSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.defaultLN.maxInlineSize = value - 10
|
||||
binding.LNmaxInlineSize.setText(settings.defaultLN.maxInlineSize.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNmaxBlockSize.setText(settings.defaultLN.maxBlockSize.toString())
|
||||
binding.LNmaxBlockSize.setOnFocusChangeListener { _, hasFocus ->
|
||||
if (!hasFocus) {
|
||||
val value = binding.LNmaxBlockSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.defaultLN.maxBlockSize = value
|
||||
binding.LNmaxBlockSize.setText(value.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
}
|
||||
binding.LNincrementMaxBlockSize.setOnClickListener {
|
||||
val value = binding.LNmaxBlockSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.defaultLN.maxInlineSize = value + 10
|
||||
binding.LNmaxBlockSize.setText(settings.defaultLN.maxInlineSize.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNdecrementMaxBlockSize.setOnClickListener {
|
||||
val value = binding.LNmaxBlockSize.text.toString().toIntOrNull() ?: 720
|
||||
settings.defaultLN.maxBlockSize = value - 10
|
||||
binding.LNmaxBlockSize.setText(settings.defaultLN.maxBlockSize.toString())
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNuseDarkTheme.isChecked = settings.defaultLN.useDarkTheme
|
||||
binding.LNuseDarkTheme.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.defaultLN.useDarkTheme = isChecked
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNuseOledTheme.isChecked = settings.defaultLN.useOledTheme
|
||||
binding.LNuseOledTheme.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.defaultLN.useOledTheme = isChecked
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNkeepScreenOn.isChecked = settings.defaultLN.keepScreenOn
|
||||
binding.LNkeepScreenOn.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.defaultLN.keepScreenOn = isChecked
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
binding.LNvolumeButton.isChecked = settings.defaultLN.volumeButtons
|
||||
binding.LNvolumeButton.setOnCheckedChangeListener { _, isChecked ->
|
||||
settings.defaultLN.volumeButtons = isChecked
|
||||
saveData(reader, settings)
|
||||
}
|
||||
|
||||
//Update Progress
|
||||
binding.readerSettingsAskUpdateProgress.isChecked = settings.askIndividual
|
||||
binding.readerSettingsAskUpdateProgress.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="480"
|
||||
android:viewportHeight="480"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="700"
|
||||
android:viewportHeight="768"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<clip-path
|
||||
android:fillColor="#e9e6f4"
|
||||
android:pathData="M125.71,125.71h516.58v516.58h-516.58z"/>
|
||||
<path
|
||||
android:fillColor="#e9e6f4"
|
||||
android:pathData="M298.5,303.98c0,10.32 -6.43,17.41 -7.83,18.82l-140,140C62.36,427.38 0,340.98 0,240c0,-132.55 107.45,-240 240,-240L240.5,0L136.18,104.28c-8.92,8.95 -29.67,33.86 -29.68,71.71 0,10.22 2.27,45.73 31.56,73.57a101,101 0,0 0,45.95 24.93v9.4a27.92,27.92 0,0 0,42 24.23l51.64,-29.81a27.23,27.23 0,0 1,14.21 8.11A27.72,27.72 0,0 1,298.5 303.98Z" />
|
||||
android:pathData="M44.26,128C44.26,173.48 80.53,210.4 125.71,211.63L125.71,128.01L642.29,128.01L642.29,639.97L768,639.97L768,128L44.26,128zM642.29,639.97L125.71,639.97L125.71,639.99L642.29,639.99L642.29,639.97zM125.71,639.97L125.71,556.38C80.54,557.6 44.28,594.5 44.26,639.97L125.71,639.97zM125.71,556.38C126.48,556.35 127.23,556.26 128,556.26L384,556.26C479.14,556.26 556.26,479.13 556.26,384C556.26,288.86 479.13,211.74 384,211.74L128,211.74C127.23,211.74 126.48,211.65 125.71,211.63L125.71,286.18L384,286.18C438.02,286.18 481.82,329.98 481.82,384C481.82,438.03 438.02,481.82 384,481.82L125.71,481.82L125.71,556.38zM125.71,481.82L125.71,286.18L0,286.18L0,481.82L125.71,481.82z"/>
|
||||
<path
|
||||
android:fillColor="#e9e6f4"
|
||||
android:pathData="M329.34,17.18 L189.26,157.26A27.91,27.91 0,0 0,181.5 176.01a29,29 0,0 0,3.43 12.88,28 28,0 0,1 41,-17l53.73,31c15.36,1.41 44.91,7.64 68.06,33.57S373.5,292.38 373.5,304.02c0,37.74 -20.73,62.68 -29.63,71.65l-0.1,0.1L239.55,480h0.45c132.55,0 240,-107.45 240,-240C480,139.02 417.64,52.62 329.34,17.18Z" />
|
||||
<path
|
||||
android:fillColor="#e9e6f4"
|
||||
android:pathData="M299.99,240a11.85,11.85 0,0 1,-6 10.37l-47,27.13 -29,16.76a12,12 0,0 1,-18 -10.37L199.99,196.11a11.95,11.95 0,0 1,18 -10.37l29,16.76 47,27.13A11.85,11.85 0,0 1,299.99 240Z" />
|
||||
android:pathData="m442,366.7l-76.02,-43.89c-13.32,-7.69 -29.96,1.92 -29.96,17.3v87.78c0,15.38 16.65,24.99 29.96,17.3l76.02,-43.89c13.32,-7.69 13.32,-26.91 0,-34.6Z"/>
|
||||
</vector>
|
||||
|
|
|
@ -73,63 +73,6 @@
|
|||
android:clipToPadding="false"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/general"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/readerSettingsSourceName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:checked="true"
|
||||
android:drawableStart="@drawable/ic_round_info_24"
|
||||
android:drawablePadding="16dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/source_info"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
||||
</com.google.android.material.materialswitch.MaterialSwitch>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/readerSettingsSystemBars"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_round_smart_button_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/show_system_bars"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
||||
</com.google.android.material.materialswitch.MaterialSwitch>
|
||||
|
||||
<ani.dantotsu.others.Xpandable
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -143,7 +86,7 @@
|
|||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="@string/default_settings"
|
||||
android:text="Default Manga Settings"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
@ -675,7 +618,631 @@
|
|||
app:thumbTint="@color/button_switch_track" />
|
||||
|
||||
</ani.dantotsu.others.Xpandable>
|
||||
<ani.dantotsu.others.Xpandable
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Default Novel Settings"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/layout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/LNlayoutText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:text="Continuous" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNpaged"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_amp_stories_24"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNcontinuous"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_view_column_24"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="@string/dual_page" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/LNdualPageText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
tools:ignore="TextContrastCheck"
|
||||
tools:text="Force" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdualNo"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_round_close_24"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdualAuto"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_screen_rotation_24"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdualForce"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:alpha="0.33"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:src="@drawable/ic_round_menu_book_24"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="Line Height" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdecrementLineHeight"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/LNlineHeight"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNincrementLineHeight"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="Margin" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdecrementMargin"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/LNmargin"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNincrementMargin"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="Maximum Inline Size" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdecrementMaxInlineSize"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/LNmaxInlineSize"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNincrementMaxInlineSize"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_family"
|
||||
android:text="Maximum column width (horizontal writing) or height (vertical writing)"
|
||||
android:textSize="14sp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:text="Maximum Block Size" />
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNdecrementMaxBlockSize"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_minus"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
style="@style/Widget.Material3.TextInputLayout.OutlinedBox.Dense"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginEnd="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/LNmaxBlockSize"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="number"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:cardBackgroundColor="@color/nav_bg_inv"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="0dp">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/LNincrementMaxBlockSize"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:scaleX="-1"
|
||||
android:src="@drawable/ic_add"
|
||||
app:tint="?attr/colorOnBackground"
|
||||
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||
</androidx.cardview.widget.CardView>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:alpha="0.58"
|
||||
android:fontFamily="@font/poppins_family"
|
||||
android:text="Maximum height (horizontal writing) or width (vertical writing)"
|
||||
android:textSize="14sp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"/>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/LNuseDarkTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_round_brightness_4_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="Use Dark Theme"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track"
|
||||
tools:ignore="TooManyViews,VisualLintButtonSize" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/LNuseOledTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_round_brightness_4_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="Use OLED Theme"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track"
|
||||
tools:ignore="VisualLintButtonSize" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/LNkeepScreenOn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_baseline_screen_lock_portrait_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/keep_screen_on"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track"
|
||||
tools:ignore="VisualLintButtonSize" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/LNvolumeButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_round_touch_app_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:enabled="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/volume_buttons"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track"
|
||||
tools:ignore="VisualLintButtonSize" />
|
||||
</ani.dantotsu.others.Xpandable>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:paddingTop="20dp"
|
||||
android:text="@string/general"
|
||||
android:textColor="?attr/colorSecondary"
|
||||
tools:ignore="TextContrastCheck" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/readerSettingsSourceName"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:checked="true"
|
||||
android:drawableStart="@drawable/ic_round_info_24"
|
||||
android:drawablePadding="16dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/source_info"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
||||
</com.google.android.material.materialswitch.MaterialSwitch>
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/readerSettingsSystemBars"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_round_smart_button_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/show_system_bars"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track">
|
||||
|
||||
</com.google.android.material.materialswitch.MaterialSwitch>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -512,6 +512,25 @@
|
|||
app:thumbTint="@color/button_switch_track"
|
||||
tools:ignore="VisualLintButtonSize" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/useOledTheme"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="false"
|
||||
android:drawableStart="@drawable/ic_round_brightness_4_24"
|
||||
android:drawablePadding="16dp"
|
||||
android:elegantTextHeight="true"
|
||||
android:fontFamily="@font/poppins_bold"
|
||||
android:minHeight="64dp"
|
||||
android:text="Use OLED Theme"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="?attr/colorOnBackground"
|
||||
app:cornerRadius="0dp"
|
||||
app:drawableTint="?attr/colorPrimary"
|
||||
app:showText="false"
|
||||
app:thumbTint="@color/button_switch_track"
|
||||
tools:ignore="VisualLintButtonSize" />
|
||||
|
||||
<com.google.android.material.materialswitch.MaterialSwitch
|
||||
android:id="@+id/keepScreenOn"
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -108,6 +108,7 @@
|
|||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||
android:layout_width="0dp"
|
||||
android:id="@+id/animeSourceLanguageContainer"
|
||||
android:visibility="gone"
|
||||
android:layout_height="56dp"
|
||||
android:layout_weight="1"
|
||||
android:hint="Language"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue