fix: settings has over 80 views
One really long layout is bad for performance, but this design also requires being aware of where an item is being placed.
This commit is contained in:
parent
f9090f59b7
commit
bbaae2e776
10 changed files with 1812 additions and 1748 deletions
|
@ -41,8 +41,16 @@ import ani.dantotsu.connections.discord.Discord
|
||||||
import ani.dantotsu.connections.mal.MAL
|
import ani.dantotsu.connections.mal.MAL
|
||||||
import ani.dantotsu.copyToClipboard
|
import ani.dantotsu.copyToClipboard
|
||||||
import ani.dantotsu.currContext
|
import ani.dantotsu.currContext
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsAboutBinding
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsAccountsBinding
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsAnimeBinding
|
||||||
import ani.dantotsu.databinding.ActivitySettingsBinding
|
import ani.dantotsu.databinding.ActivitySettingsBinding
|
||||||
import ani.dantotsu.download.DownloadedType
|
import ani.dantotsu.download.DownloadedType
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsCommonBinding
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsExtensionsBinding
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsMangaBinding
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsNotificationsBinding
|
||||||
|
import ani.dantotsu.databinding.ActivitySettingsThemeBinding
|
||||||
import ani.dantotsu.download.DownloadsManager
|
import ani.dantotsu.download.DownloadsManager
|
||||||
import ani.dantotsu.download.video.ExoplayerDownloadService
|
import ani.dantotsu.download.video.ExoplayerDownloadService
|
||||||
import ani.dantotsu.downloadsPermission
|
import ani.dantotsu.downloadsPermission
|
||||||
|
@ -92,6 +100,14 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
override fun handleOnBackPressed() = startMainActivity(this@SettingsActivity)
|
override fun handleOnBackPressed() = startMainActivity(this@SettingsActivity)
|
||||||
}
|
}
|
||||||
lateinit var binding: ActivitySettingsBinding
|
lateinit var binding: ActivitySettingsBinding
|
||||||
|
lateinit var bindingAccounts: ActivitySettingsAccountsBinding
|
||||||
|
lateinit var bindingTheme: ActivitySettingsThemeBinding
|
||||||
|
lateinit var bindingExtensions: ActivitySettingsExtensionsBinding
|
||||||
|
lateinit var bindingCommon: ActivitySettingsCommonBinding
|
||||||
|
lateinit var bindingAnime: ActivitySettingsAnimeBinding
|
||||||
|
lateinit var bindingManga: ActivitySettingsMangaBinding
|
||||||
|
lateinit var bindingNotifications: ActivitySettingsNotificationsBinding
|
||||||
|
lateinit var bindingAbout: ActivitySettingsAboutBinding
|
||||||
private val extensionInstaller = Injekt.get<BasePreferences>().extensionInstaller()
|
private val extensionInstaller = Injekt.get<BasePreferences>().extensionInstaller()
|
||||||
private var cursedCounter = 0
|
private var cursedCounter = 0
|
||||||
|
|
||||||
|
@ -101,6 +117,14 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
ThemeManager(this).applyTheme()
|
ThemeManager(this).applyTheme()
|
||||||
binding = ActivitySettingsBinding.inflate(layoutInflater)
|
binding = ActivitySettingsBinding.inflate(layoutInflater)
|
||||||
|
bindingAccounts = ActivitySettingsAccountsBinding.bind(binding.root)
|
||||||
|
bindingTheme = ActivitySettingsThemeBinding.bind(binding.root)
|
||||||
|
bindingExtensions = ActivitySettingsExtensionsBinding.bind(binding.root)
|
||||||
|
bindingCommon = ActivitySettingsCommonBinding.bind(binding.root)
|
||||||
|
bindingAnime = ActivitySettingsAnimeBinding.bind(binding.root)
|
||||||
|
bindingManga = ActivitySettingsMangaBinding.bind(binding.root)
|
||||||
|
bindingNotifications = ActivitySettingsNotificationsBinding.bind(binding.root)
|
||||||
|
bindingAbout = ActivitySettingsAboutBinding.bind(binding.root)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
initActivity(this)
|
initActivity(this)
|
||||||
|
@ -166,41 +190,41 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
onBackPressedDispatcher.onBackPressed()
|
onBackPressedDispatcher.onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUseMaterialYou.isChecked = PrefManager.getVal(PrefName.UseMaterialYou)
|
bindingTheme.settingsUseMaterialYou.isChecked = PrefManager.getVal(PrefName.UseMaterialYou)
|
||||||
binding.settingsUseMaterialYou.setOnCheckedChangeListener { _, isChecked ->
|
bindingTheme.settingsUseMaterialYou.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.UseMaterialYou, isChecked)
|
PrefManager.setVal(PrefName.UseMaterialYou, isChecked)
|
||||||
if (isChecked) binding.settingsUseCustomTheme.isChecked = false
|
if (isChecked) bindingTheme.settingsUseCustomTheme.isChecked = false
|
||||||
restartApp()
|
restartApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUseCustomTheme.isChecked = PrefManager.getVal(PrefName.UseCustomTheme)
|
bindingTheme.settingsUseCustomTheme.isChecked = PrefManager.getVal(PrefName.UseCustomTheme)
|
||||||
binding.settingsUseCustomTheme.setOnCheckedChangeListener { _, isChecked ->
|
bindingTheme.settingsUseCustomTheme.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.UseCustomTheme, isChecked)
|
PrefManager.setVal(PrefName.UseCustomTheme, isChecked)
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
binding.settingsUseMaterialYou.isChecked = false
|
bindingTheme.settingsUseMaterialYou.isChecked = false
|
||||||
}
|
}
|
||||||
|
|
||||||
restartApp()
|
restartApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUseSourceTheme.isChecked = PrefManager.getVal(PrefName.UseSourceTheme)
|
bindingTheme.settingsUseSourceTheme.isChecked = PrefManager.getVal(PrefName.UseSourceTheme)
|
||||||
binding.settingsUseSourceTheme.setOnCheckedChangeListener { _, isChecked ->
|
bindingTheme.settingsUseSourceTheme.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.UseSourceTheme, isChecked)
|
PrefManager.setVal(PrefName.UseSourceTheme, isChecked)
|
||||||
restartApp()
|
restartApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUseOLED.isChecked = PrefManager.getVal(PrefName.UseOLED)
|
bindingTheme.settingsUseOLED.isChecked = PrefManager.getVal(PrefName.UseOLED)
|
||||||
binding.settingsUseOLED.setOnCheckedChangeListener { _, isChecked ->
|
bindingTheme.settingsUseOLED.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.UseOLED, isChecked)
|
PrefManager.setVal(PrefName.UseOLED, isChecked)
|
||||||
restartApp()
|
restartApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
val themeString: String = PrefManager.getVal(PrefName.Theme)
|
val themeString: String = PrefManager.getVal(PrefName.Theme)
|
||||||
binding.themeSwitcher.setText(
|
bindingTheme.themeSwitcher.setText(
|
||||||
themeString.substring(0, 1) + themeString.substring(1).lowercase()
|
themeString.substring(0, 1) + themeString.substring(1).lowercase()
|
||||||
)
|
)
|
||||||
|
|
||||||
binding.themeSwitcher.setAdapter(
|
bindingTheme.themeSwitcher.setAdapter(
|
||||||
ArrayAdapter(
|
ArrayAdapter(
|
||||||
this,
|
this,
|
||||||
R.layout.item_dropdown,
|
R.layout.item_dropdown,
|
||||||
|
@ -208,16 +232,16 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
.map { it.theme.substring(0, 1) + it.theme.substring(1).lowercase() })
|
.map { it.theme.substring(0, 1) + it.theme.substring(1).lowercase() })
|
||||||
)
|
)
|
||||||
|
|
||||||
binding.themeSwitcher.setOnItemClickListener { _, _, i, _ ->
|
bindingTheme.themeSwitcher.setOnItemClickListener { _, _, i, _ ->
|
||||||
PrefManager.setVal(PrefName.Theme, ThemeManager.Companion.Theme.entries[i].theme)
|
PrefManager.setVal(PrefName.Theme, ThemeManager.Companion.Theme.entries[i].theme)
|
||||||
//ActivityHelper.shouldRefreshMainActivity = true
|
//ActivityHelper.shouldRefreshMainActivity = true
|
||||||
binding.themeSwitcher.clearFocus()
|
bindingTheme.themeSwitcher.clearFocus()
|
||||||
restartApp()
|
restartApp()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
binding.customTheme.setOnClickListener {
|
bindingTheme.customTheme.setOnClickListener {
|
||||||
val originalColor: Int = PrefManager.getVal(PrefName.CustomThemeInt)
|
val originalColor: Int = PrefManager.getVal(PrefName.CustomThemeInt)
|
||||||
|
|
||||||
class CustomColorDialog : SimpleColorDialog() { //idk where to put it
|
class CustomColorDialog : SimpleColorDialog() { //idk where to put it
|
||||||
|
@ -239,7 +263,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
.show(this, tag)
|
.show(this, tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsPlayer.setOnClickListener {
|
bindingAnime.settingsPlayer.setOnClickListener {
|
||||||
startActivity(Intent(this, PlayerSettingsActivity::class.java))
|
startActivity(Intent(this, PlayerSettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +271,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
val downloadManagerDialog =
|
val downloadManagerDialog =
|
||||||
AlertDialog.Builder(this, R.style.MyPopup).setTitle("Download Manager")
|
AlertDialog.Builder(this, R.style.MyPopup).setTitle("Download Manager")
|
||||||
var downloadManager: Int = PrefManager.getVal(PrefName.DownloadManager)
|
var downloadManager: Int = PrefManager.getVal(PrefName.DownloadManager)
|
||||||
binding.settingsDownloadManager.setOnClickListener {
|
bindingCommon.settingsDownloadManager.setOnClickListener {
|
||||||
val dialog = downloadManagerDialog.setSingleChoiceItems(
|
val dialog = downloadManagerDialog.setSingleChoiceItems(
|
||||||
managers,
|
managers,
|
||||||
downloadManager
|
downloadManager
|
||||||
|
@ -259,7 +283,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.window?.setDimAmount(0.8f)
|
dialog.window?.setDimAmount(0.8f)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.importExportSettings.setOnClickListener {
|
bindingCommon.importExportSettings.setOnClickListener {
|
||||||
downloadsPermission(this)
|
downloadsPermission(this)
|
||||||
val selectedArray = mutableListOf(false)
|
val selectedArray = mutableListOf(false)
|
||||||
val filteredLocations = Location.entries.filter { it.exportable }
|
val filteredLocations = Location.entries.filter { it.exportable }
|
||||||
|
@ -314,7 +338,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.purgeAnimeDownloads.setOnClickListener {
|
bindingAnime.purgeAnimeDownloads.setOnClickListener {
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle("Purge Anime Downloads")
|
.setTitle("Purge Anime Downloads")
|
||||||
.setMessage("Are you sure you want to purge all anime downloads?")
|
.setMessage("Are you sure you want to purge all anime downloads?")
|
||||||
|
@ -336,7 +360,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.purgeMangaDownloads.setOnClickListener {
|
bindingManga.purgeMangaDownloads.setOnClickListener {
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle("Purge Manga Downloads")
|
.setTitle("Purge Manga Downloads")
|
||||||
.setMessage("Are you sure you want to purge all manga downloads?")
|
.setMessage("Are you sure you want to purge all manga downloads?")
|
||||||
|
@ -353,7 +377,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.purgeNovelDownloads.setOnClickListener {
|
bindingManga.purgeNovelDownloads.setOnClickListener {
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle("Purge Novel Downloads")
|
.setTitle("Purge Novel Downloads")
|
||||||
.setMessage("Are you sure you want to purge all novel downloads?")
|
.setMessage("Are you sure you want to purge all novel downloads?")
|
||||||
|
@ -370,9 +394,9 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsForceLegacyInstall.isChecked =
|
bindingExtensions.settingsForceLegacyInstall.isChecked =
|
||||||
extensionInstaller.get() == BasePreferences.ExtensionInstaller.LEGACY
|
extensionInstaller.get() == BasePreferences.ExtensionInstaller.LEGACY
|
||||||
binding.settingsForceLegacyInstall.setOnCheckedChangeListener { _, isChecked ->
|
bindingExtensions.settingsForceLegacyInstall.setOnCheckedChangeListener { _, isChecked ->
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
extensionInstaller.set(BasePreferences.ExtensionInstaller.LEGACY)
|
extensionInstaller.set(BasePreferences.ExtensionInstaller.LEGACY)
|
||||||
} else {
|
} else {
|
||||||
|
@ -380,17 +404,17 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.skipExtensionIcons.isChecked = PrefManager.getVal(PrefName.SkipExtensionIcons)
|
bindingExtensions.skipExtensionIcons.isChecked = PrefManager.getVal(PrefName.SkipExtensionIcons)
|
||||||
binding.skipExtensionIcons.setOnCheckedChangeListener { _, isChecked ->
|
bindingExtensions.skipExtensionIcons.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.getVal(PrefName.SkipExtensionIcons, isChecked)
|
PrefManager.getVal(PrefName.SkipExtensionIcons, isChecked)
|
||||||
}
|
}
|
||||||
binding.NSFWExtension.isChecked = PrefManager.getVal(PrefName.NSFWExtension)
|
bindingExtensions.NSFWExtension.isChecked = PrefManager.getVal(PrefName.NSFWExtension)
|
||||||
binding.NSFWExtension.setOnCheckedChangeListener { _, isChecked ->
|
bindingExtensions.NSFWExtension.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.NSFWExtension, isChecked)
|
PrefManager.setVal(PrefName.NSFWExtension, isChecked)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.userAgent.setOnClickListener {
|
bindingExtensions.userAgent.setOnClickListener {
|
||||||
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
val dialogView = layoutInflater.inflate(R.layout.dialog_user_agent, null)
|
||||||
val editText = dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox)
|
val editText = dialogView.findViewById<TextInputEditText>(R.id.userAgentTextBox)
|
||||||
editText.setText(PrefManager.getVal<String>(PrefName.DefaultUserAgent))
|
editText.setText(PrefManager.getVal<String>(PrefName.DefaultUserAgent))
|
||||||
|
@ -432,51 +456,51 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
"Shecan",
|
"Shecan",
|
||||||
"Libre"
|
"Libre"
|
||||||
)
|
)
|
||||||
binding.settingsExtensionDns.setText(exDns[PrefManager.getVal(PrefName.DohProvider)])
|
bindingCommon.settingsExtensionDns.setText(exDns[PrefManager.getVal(PrefName.DohProvider)])
|
||||||
binding.settingsExtensionDns.setAdapter(ArrayAdapter(this, R.layout.item_dropdown, exDns))
|
bindingCommon.settingsExtensionDns.setAdapter(ArrayAdapter(this, R.layout.item_dropdown, exDns))
|
||||||
binding.settingsExtensionDns.setOnItemClickListener { _, _, i, _ ->
|
bindingCommon.settingsExtensionDns.setOnItemClickListener { _, _, i, _ ->
|
||||||
PrefManager.setVal(PrefName.DohProvider, i)
|
PrefManager.setVal(PrefName.DohProvider, i)
|
||||||
binding.settingsExtensionDns.clearFocus()
|
bindingCommon.settingsExtensionDns.clearFocus()
|
||||||
Toast.makeText(this, "Restart app to apply changes", Toast.LENGTH_LONG).show()
|
restartApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsDownloadInSd.isChecked = PrefManager.getVal(PrefName.SdDl)
|
bindingCommon.settingsDownloadInSd.isChecked = PrefManager.getVal(PrefName.SdDl)
|
||||||
binding.settingsDownloadInSd.setOnCheckedChangeListener { _, isChecked ->
|
bindingCommon.settingsDownloadInSd.setOnCheckedChangeListener { _, isChecked ->
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
val arrayOfFiles = ContextCompat.getExternalFilesDirs(this, null)
|
val arrayOfFiles = ContextCompat.getExternalFilesDirs(this, null)
|
||||||
if (arrayOfFiles.size > 1 && arrayOfFiles[1] != null) {
|
if (arrayOfFiles.size > 1 && arrayOfFiles[1] != null) {
|
||||||
PrefManager.setVal(PrefName.SdDl, true)
|
PrefManager.setVal(PrefName.SdDl, true)
|
||||||
} else {
|
} else {
|
||||||
binding.settingsDownloadInSd.isChecked = false
|
bindingCommon.settingsDownloadInSd.isChecked = false
|
||||||
PrefManager.setVal(PrefName.SdDl, true)
|
PrefManager.setVal(PrefName.SdDl, true)
|
||||||
snackString(getString(R.string.noSdFound))
|
snackString(getString(R.string.noSdFound))
|
||||||
}
|
}
|
||||||
} else PrefManager.setVal(PrefName.SdDl, true)
|
} else PrefManager.setVal(PrefName.SdDl, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsContinueMedia.isChecked = PrefManager.getVal(PrefName.ContinueMedia)
|
bindingCommon.settingsContinueMedia.isChecked = PrefManager.getVal(PrefName.ContinueMedia)
|
||||||
binding.settingsContinueMedia.setOnCheckedChangeListener { _, isChecked ->
|
bindingCommon.settingsContinueMedia.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.ContinueMedia, isChecked)
|
PrefManager.setVal(PrefName.ContinueMedia, isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsRecentlyListOnly.isChecked = PrefManager.getVal(PrefName.RecentlyListOnly)
|
bindingCommon.settingsRecentlyListOnly.isChecked = PrefManager.getVal(PrefName.RecentlyListOnly)
|
||||||
binding.settingsRecentlyListOnly.setOnCheckedChangeListener { _, isChecked ->
|
bindingCommon.settingsRecentlyListOnly.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.RecentlyListOnly, isChecked)
|
PrefManager.setVal(PrefName.RecentlyListOnly, isChecked)
|
||||||
}
|
}
|
||||||
binding.settingsPreferDub.isChecked = PrefManager.getVal(PrefName.SettingsPreferDub)
|
bindingAnime.settingsPreferDub.isChecked = PrefManager.getVal(PrefName.SettingsPreferDub)
|
||||||
binding.settingsPreferDub.setOnCheckedChangeListener { _, isChecked ->
|
bindingAnime.settingsPreferDub.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.SettingsPreferDub, isChecked)
|
PrefManager.setVal(PrefName.SettingsPreferDub, isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsReader.setOnClickListener {
|
bindingManga.settingsReader.setOnClickListener {
|
||||||
startActivity(Intent(this, ReaderSettingsActivity::class.java))
|
startActivity(Intent(this, ReaderSettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
var previous: View = when (PrefManager.getVal<Int>(PrefName.DarkMode)) {
|
var previous: View = when (PrefManager.getVal<Int>(PrefName.DarkMode)) {
|
||||||
0 -> binding.settingsUiAuto
|
0 -> bindingTheme.settingsUiAuto
|
||||||
1 -> binding.settingsUiLight
|
1 -> bindingTheme.settingsUiLight
|
||||||
2 -> binding.settingsUiDark
|
2 -> bindingTheme.settingsUiDark
|
||||||
else -> binding.settingsUiAuto
|
else -> bindingTheme.settingsUiAuto
|
||||||
}
|
}
|
||||||
previous.alpha = 1f
|
previous.alpha = 1f
|
||||||
fun uiTheme(mode: Int, current: View) {
|
fun uiTheme(mode: Int, current: View) {
|
||||||
|
@ -490,24 +514,24 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
initActivity(this)
|
initActivity(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUiAuto.setOnClickListener {
|
bindingTheme.settingsUiAuto.setOnClickListener {
|
||||||
uiTheme(0, it)
|
uiTheme(0, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUiLight.setOnClickListener {
|
bindingTheme.settingsUiLight.setOnClickListener {
|
||||||
binding.settingsUseOLED.isChecked = false
|
bindingTheme.settingsUseOLED.isChecked = false
|
||||||
uiTheme(1, it)
|
uiTheme(1, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsUiDark.setOnClickListener {
|
bindingTheme.settingsUiDark.setOnClickListener {
|
||||||
uiTheme(2, it)
|
uiTheme(2, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
var previousStart: View = when (PrefManager.getVal<Int>(PrefName.DefaultStartUpTab)) {
|
var previousStart: View = when (PrefManager.getVal<Int>(PrefName.DefaultStartUpTab)) {
|
||||||
0 -> binding.uiSettingsAnime
|
0 -> bindingCommon.uiSettingsAnime
|
||||||
1 -> binding.uiSettingsHome
|
1 -> bindingCommon.uiSettingsHome
|
||||||
2 -> binding.uiSettingsManga
|
2 -> bindingCommon.uiSettingsManga
|
||||||
else -> binding.uiSettingsHome
|
else -> bindingCommon.uiSettingsHome
|
||||||
}
|
}
|
||||||
previousStart.alpha = 1f
|
previousStart.alpha = 1f
|
||||||
fun uiDefault(mode: Int, current: View) {
|
fun uiDefault(mode: Int, current: View) {
|
||||||
|
@ -519,28 +543,28 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
binding.uiSettingsAnime.setOnClickListener {
|
bindingCommon.uiSettingsAnime.setOnClickListener {
|
||||||
uiDefault(0, it)
|
uiDefault(0, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.uiSettingsHome.setOnClickListener {
|
bindingCommon.uiSettingsHome.setOnClickListener {
|
||||||
uiDefault(1, it)
|
uiDefault(1, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.uiSettingsManga.setOnClickListener {
|
bindingCommon.uiSettingsManga.setOnClickListener {
|
||||||
uiDefault(2, it)
|
uiDefault(2, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsShowYt.isChecked = PrefManager.getVal(PrefName.ShowYtButton)
|
bindingAnime.settingsShowYt.isChecked = PrefManager.getVal(PrefName.ShowYtButton)
|
||||||
binding.settingsShowYt.setOnCheckedChangeListener { _, isChecked ->
|
bindingAnime.settingsShowYt.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.ShowYtButton, isChecked)
|
PrefManager.setVal(PrefName.ShowYtButton, isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
var previousEp: View = when (PrefManager.getVal<Int>(PrefName.AnimeDefaultView)) {
|
var previousEp: View = when (PrefManager.getVal<Int>(PrefName.AnimeDefaultView)) {
|
||||||
0 -> binding.settingsEpList
|
0 -> bindingAnime.settingsEpList
|
||||||
1 -> binding.settingsEpGrid
|
1 -> bindingAnime.settingsEpGrid
|
||||||
2 -> binding.settingsEpCompact
|
2 -> bindingAnime.settingsEpCompact
|
||||||
else -> binding.settingsEpList
|
else -> bindingAnime.settingsEpList
|
||||||
}
|
}
|
||||||
previousEp.alpha = 1f
|
previousEp.alpha = 1f
|
||||||
fun uiEp(mode: Int, current: View) {
|
fun uiEp(mode: Int, current: View) {
|
||||||
|
@ -550,22 +574,22 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
PrefManager.setVal(PrefName.AnimeDefaultView, mode)
|
PrefManager.setVal(PrefName.AnimeDefaultView, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsEpList.setOnClickListener {
|
bindingAnime.settingsEpList.setOnClickListener {
|
||||||
uiEp(0, it)
|
uiEp(0, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsEpGrid.setOnClickListener {
|
bindingAnime.settingsEpGrid.setOnClickListener {
|
||||||
uiEp(1, it)
|
uiEp(1, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsEpCompact.setOnClickListener {
|
bindingAnime.settingsEpCompact.setOnClickListener {
|
||||||
uiEp(2, it)
|
uiEp(2, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
var previousChp: View = when (PrefManager.getVal<Int>(PrefName.MangaDefaultView)) {
|
var previousChp: View = when (PrefManager.getVal<Int>(PrefName.MangaDefaultView)) {
|
||||||
0 -> binding.settingsChpList
|
0 -> bindingManga.settingsChpList
|
||||||
1 -> binding.settingsChpCompact
|
1 -> bindingManga.settingsChpCompact
|
||||||
else -> binding.settingsChpList
|
else -> bindingManga.settingsChpList
|
||||||
}
|
}
|
||||||
previousChp.alpha = 1f
|
previousChp.alpha = 1f
|
||||||
fun uiChp(mode: Int, current: View) {
|
fun uiChp(mode: Int, current: View) {
|
||||||
|
@ -575,11 +599,11 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
PrefManager.setVal(PrefName.MangaDefaultView, mode)
|
PrefManager.setVal(PrefName.MangaDefaultView, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsChpList.setOnClickListener {
|
bindingManga.settingsChpList.setOnClickListener {
|
||||||
uiChp(0, it)
|
uiChp(0, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsChpCompact.setOnClickListener {
|
bindingManga.settingsChpCompact.setOnClickListener {
|
||||||
uiChp(1, it)
|
uiChp(1, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,11 +626,11 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
binding.loginTelegram.setOnClickListener {
|
binding.loginTelegram.setOnClickListener {
|
||||||
openLinkInBrowser(getString(R.string.telegram))
|
openLinkInBrowser(getString(R.string.telegram))
|
||||||
}
|
}
|
||||||
binding.settingsUi.setOnClickListener {
|
bindingCommon.settingsUi.setOnClickListener {
|
||||||
startActivity(Intent(this, UserInterfaceSettingsActivity::class.java))
|
startActivity(Intent(this, UserInterfaceSettingsActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsFAQ.setOnClickListener {
|
bindingAbout.settingsFAQ.setOnClickListener {
|
||||||
startActivity(Intent(this, FAQActivity::class.java))
|
startActivity(Intent(this, FAQActivity::class.java))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,13 +651,13 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsDev.setOnClickListener {
|
bindingAbout.settingsDev.setOnClickListener {
|
||||||
DevelopersDialogFragment().show(supportFragmentManager, "dialog")
|
DevelopersDialogFragment().show(supportFragmentManager, "dialog")
|
||||||
}
|
}
|
||||||
binding.settingsForks.setOnClickListener {
|
bindingAbout.settingsForks.setOnClickListener {
|
||||||
ForksDialogFragment().show(supportFragmentManager, "dialog")
|
ForksDialogFragment().show(supportFragmentManager, "dialog")
|
||||||
}
|
}
|
||||||
binding.settingsDisclaimer.setOnClickListener {
|
bindingAbout.settingsDisclaimer.setOnClickListener {
|
||||||
val title = getString(R.string.disclaimer)
|
val title = getString(R.string.disclaimer)
|
||||||
val text = TextView(this)
|
val text = TextView(this)
|
||||||
text.setText(R.string.full_disclaimer)
|
text.setText(R.string.full_disclaimer)
|
||||||
|
@ -655,14 +679,14 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
if (it > 0) "${if (hours > 0) "$hours hrs " else ""}${if (mins > 0) "$mins mins" else ""}"
|
if (it > 0) "${if (hours > 0) "$hours hrs " else ""}${if (mins > 0) "$mins mins" else ""}"
|
||||||
else getString(R.string.do_not_update)
|
else getString(R.string.do_not_update)
|
||||||
}.toTypedArray()
|
}.toTypedArray()
|
||||||
binding.settingsSubscriptionsTime.text =
|
bindingNotifications.settingsSubscriptionsTime.text =
|
||||||
getString(R.string.subscriptions_checking_time_s, timeNames[curTime])
|
getString(R.string.subscriptions_checking_time_s, timeNames[curTime])
|
||||||
val speedDialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val speedDialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle(R.string.subscriptions_checking_time)
|
.setTitle(R.string.subscriptions_checking_time)
|
||||||
binding.settingsSubscriptionsTime.setOnClickListener {
|
bindingNotifications.settingsSubscriptionsTime.setOnClickListener {
|
||||||
val dialog = speedDialog.setSingleChoiceItems(timeNames, curTime) { dialog, i ->
|
val dialog = speedDialog.setSingleChoiceItems(timeNames, curTime) { dialog, i ->
|
||||||
curTime = i
|
curTime = i
|
||||||
binding.settingsSubscriptionsTime.text =
|
bindingNotifications.settingsSubscriptionsTime.text =
|
||||||
getString(R.string.subscriptions_checking_time_s, timeNames[i])
|
getString(R.string.subscriptions_checking_time_s, timeNames[i])
|
||||||
PrefManager.setVal(PrefName.SubscriptionNotificationInterval, curTime)
|
PrefManager.setVal(PrefName.SubscriptionNotificationInterval, curTime)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
|
@ -673,7 +697,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.window?.setDimAmount(0.8f)
|
dialog.window?.setDimAmount(0.8f)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsSubscriptionsTime.setOnLongClickListener {
|
bindingNotifications.settingsSubscriptionsTime.setOnLongClickListener {
|
||||||
TaskScheduler.create(this,
|
TaskScheduler.create(this,
|
||||||
PrefManager.getVal(PrefName.UseAlarmManager)
|
PrefManager.getVal(PrefName.UseAlarmManager)
|
||||||
).scheduleAllTasks(this)
|
).scheduleAllTasks(this)
|
||||||
|
@ -687,16 +711,16 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
if (it > 0) "${if (hours > 0) "$hours hrs " else ""}${if (mins > 0) "$mins mins" else ""}"
|
if (it > 0) "${if (hours > 0) "$hours hrs " else ""}${if (mins > 0) "$mins mins" else ""}"
|
||||||
else getString(R.string.do_not_update)
|
else getString(R.string.do_not_update)
|
||||||
}
|
}
|
||||||
binding.settingsAnilistSubscriptionsTime.text =
|
bindingNotifications.settingsAnilistSubscriptionsTime.text =
|
||||||
getString(R.string.anilist_notifications_checking_time, aItems[PrefManager.getVal(PrefName.AnilistNotificationInterval)])
|
getString(R.string.anilist_notifications_checking_time, aItems[PrefManager.getVal(PrefName.AnilistNotificationInterval)])
|
||||||
binding.settingsAnilistSubscriptionsTime.setOnClickListener {
|
bindingNotifications.settingsAnilistSubscriptionsTime.setOnClickListener {
|
||||||
|
|
||||||
val selected = PrefManager.getVal<Int>(PrefName.AnilistNotificationInterval)
|
val selected = PrefManager.getVal<Int>(PrefName.AnilistNotificationInterval)
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle(R.string.subscriptions_checking_time)
|
.setTitle(R.string.subscriptions_checking_time)
|
||||||
.setSingleChoiceItems(aItems.toTypedArray(), selected) { dialog, i ->
|
.setSingleChoiceItems(aItems.toTypedArray(), selected) { dialog, i ->
|
||||||
PrefManager.setVal(PrefName.AnilistNotificationInterval, i)
|
PrefManager.setVal(PrefName.AnilistNotificationInterval, i)
|
||||||
binding.settingsAnilistSubscriptionsTime.text =
|
bindingNotifications.settingsAnilistSubscriptionsTime.text =
|
||||||
getString(R.string.anilist_notifications_checking_time, aItems[i])
|
getString(R.string.anilist_notifications_checking_time, aItems[i])
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
TaskScheduler.create(this,
|
TaskScheduler.create(this,
|
||||||
|
@ -708,7 +732,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsAnilistNotifications.setOnClickListener {
|
bindingNotifications.settingsAnilistNotifications.setOnClickListener {
|
||||||
val types = NotificationType.entries.map { it.name }
|
val types = NotificationType.entries.map { it.name }
|
||||||
val filteredTypes = PrefManager.getVal<Set<String>>(PrefName.AnilistFilteredTypes).toMutableSet()
|
val filteredTypes = PrefManager.getVal<Set<String>>(PrefName.AnilistFilteredTypes).toMutableSet()
|
||||||
val selected = types.map { filteredTypes.contains(it) }.toBooleanArray()
|
val selected = types.map { filteredTypes.contains(it) }.toBooleanArray()
|
||||||
|
@ -735,15 +759,15 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
if (it > 0) "${if (hours > 0) "$hours hrs " else ""}${if (mins > 0) "$mins mins" else ""}"
|
if (it > 0) "${if (hours > 0) "$hours hrs " else ""}${if (mins > 0) "$mins mins" else ""}"
|
||||||
else getString(R.string.do_not_update)
|
else getString(R.string.do_not_update)
|
||||||
}
|
}
|
||||||
binding.settingsCommentSubscriptionsTime.text =
|
bindingNotifications.settingsCommentSubscriptionsTime.text =
|
||||||
getString(R.string.comment_notification_checking_time, cItems[PrefManager.getVal(PrefName.CommentNotificationInterval)])
|
getString(R.string.comment_notification_checking_time, cItems[PrefManager.getVal(PrefName.CommentNotificationInterval)])
|
||||||
binding.settingsCommentSubscriptionsTime.setOnClickListener {
|
bindingNotifications.settingsCommentSubscriptionsTime.setOnClickListener {
|
||||||
val selected = PrefManager.getVal<Int>(PrefName.CommentNotificationInterval)
|
val selected = PrefManager.getVal<Int>(PrefName.CommentNotificationInterval)
|
||||||
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val dialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle(R.string.subscriptions_checking_time)
|
.setTitle(R.string.subscriptions_checking_time)
|
||||||
.setSingleChoiceItems(cItems.toTypedArray(), selected) { dialog, i ->
|
.setSingleChoiceItems(cItems.toTypedArray(), selected) { dialog, i ->
|
||||||
PrefManager.setVal(PrefName.CommentNotificationInterval, i)
|
PrefManager.setVal(PrefName.CommentNotificationInterval, i)
|
||||||
binding.settingsCommentSubscriptionsTime.text =
|
bindingNotifications.settingsCommentSubscriptionsTime.text =
|
||||||
getString(R.string.comment_notification_checking_time, cItems[i])
|
getString(R.string.comment_notification_checking_time, cItems[i])
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
TaskScheduler.create(this,
|
TaskScheduler.create(this,
|
||||||
|
@ -755,20 +779,20 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsNotificationsCheckingSubscriptions.isChecked =
|
bindingNotifications.settingsNotificationsCheckingSubscriptions.isChecked =
|
||||||
PrefManager.getVal(PrefName.SubscriptionCheckingNotifications)
|
PrefManager.getVal(PrefName.SubscriptionCheckingNotifications)
|
||||||
binding.settingsNotificationsCheckingSubscriptions.setOnCheckedChangeListener { _, isChecked ->
|
bindingNotifications.settingsNotificationsCheckingSubscriptions.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.SubscriptionCheckingNotifications, isChecked)
|
PrefManager.setVal(PrefName.SubscriptionCheckingNotifications, isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsNotificationsCheckingSubscriptions.setOnLongClickListener {
|
bindingNotifications.settingsNotificationsCheckingSubscriptions.setOnLongClickListener {
|
||||||
openSettings(this, null)
|
openSettings(this, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsNotificationsUseAlarmManager.isChecked =
|
bindingNotifications.settingsNotificationsUseAlarmManager.isChecked =
|
||||||
PrefManager.getVal(PrefName.UseAlarmManager)
|
PrefManager.getVal(PrefName.UseAlarmManager)
|
||||||
|
|
||||||
binding.settingsNotificationsUseAlarmManager.setOnCheckedChangeListener { _, isChecked ->
|
bindingNotifications.settingsNotificationsUseAlarmManager.setOnCheckedChangeListener { _, isChecked ->
|
||||||
if (isChecked) {
|
if (isChecked) {
|
||||||
val alertDialog = AlertDialog.Builder(this, R.style.MyPopup)
|
val alertDialog = AlertDialog.Builder(this, R.style.MyPopup)
|
||||||
.setTitle("Use Alarm Manager")
|
.setTitle("Use Alarm Manager")
|
||||||
|
@ -779,13 +803,13 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
if (!(getSystemService(Context.ALARM_SERVICE) as AlarmManager).canScheduleExactAlarms()) {
|
if (!(getSystemService(Context.ALARM_SERVICE) as AlarmManager).canScheduleExactAlarms()) {
|
||||||
val intent = Intent("android.settings.REQUEST_SCHEDULE_EXACT_ALARM")
|
val intent = Intent("android.settings.REQUEST_SCHEDULE_EXACT_ALARM")
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
binding.settingsNotificationsCheckingSubscriptions.isChecked = true
|
bindingNotifications.settingsNotificationsCheckingSubscriptions.isChecked = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
.setNegativeButton("Cancel") { dialog, _ ->
|
.setNegativeButton("Cancel") { dialog, _ ->
|
||||||
binding.settingsNotificationsCheckingSubscriptions.isChecked = false
|
bindingNotifications.settingsNotificationsCheckingSubscriptions.isChecked = false
|
||||||
PrefManager.setVal(PrefName.UseAlarmManager, false)
|
PrefManager.setVal(PrefName.UseAlarmManager, false)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
|
@ -807,46 +831,46 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsCheckUpdate.isChecked = PrefManager.getVal(PrefName.CheckUpdate)
|
bindingAbout.settingsCheckUpdate.isChecked = PrefManager.getVal(PrefName.CheckUpdate)
|
||||||
binding.settingsCheckUpdate.setOnCheckedChangeListener { _, isChecked ->
|
bindingAbout.settingsCheckUpdate.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.CheckUpdate, isChecked)
|
PrefManager.setVal(PrefName.CheckUpdate, isChecked)
|
||||||
if (!isChecked) {
|
if (!isChecked) {
|
||||||
snackString(getString(R.string.long_click_to_check_update))
|
snackString(getString(R.string.long_click_to_check_update))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsCheckUpdate.setOnLongClickListener {
|
bindingAbout.settingsCheckUpdate.setOnLongClickListener {
|
||||||
lifecycleScope.launch(Dispatchers.IO) {
|
lifecycleScope.launch(Dispatchers.IO) {
|
||||||
AppUpdater.check(this@SettingsActivity, true)
|
AppUpdater.check(this@SettingsActivity, true)
|
||||||
}
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsShareUsername.isChecked = PrefManager.getVal(PrefName.SharedUserID)
|
bindingAbout.settingsShareUsername.isChecked = PrefManager.getVal(PrefName.SharedUserID)
|
||||||
binding.settingsShareUsername.setOnCheckedChangeListener { _, isChecked ->
|
bindingAbout.settingsShareUsername.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.SharedUserID, isChecked)
|
PrefManager.setVal(PrefName.SharedUserID, isChecked)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
binding.settingsCheckUpdate.visibility = View.GONE
|
bindingAbout.settingsCheckUpdate.visibility = View.GONE
|
||||||
binding.settingsShareUsername.visibility = View.GONE
|
bindingAbout.settingsShareUsername.visibility = View.GONE
|
||||||
binding.settingsCheckUpdate.isEnabled = false
|
bindingAbout.settingsCheckUpdate.isEnabled = false
|
||||||
binding.settingsShareUsername.isEnabled = false
|
bindingAbout.settingsShareUsername.isEnabled = false
|
||||||
binding.settingsCheckUpdate.isChecked = false
|
bindingAbout.settingsCheckUpdate.isChecked = false
|
||||||
binding.settingsShareUsername.isChecked = false
|
bindingAbout.settingsShareUsername.isChecked = false
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsLogToFile.isChecked = PrefManager.getVal(PrefName.LogToFile)
|
bindingAbout.settingsLogToFile.isChecked = PrefManager.getVal(PrefName.LogToFile)
|
||||||
binding.settingsLogToFile.setOnCheckedChangeListener { _, isChecked ->
|
bindingAbout.settingsLogToFile.setOnCheckedChangeListener { _, isChecked ->
|
||||||
PrefManager.setVal(PrefName.LogToFile, isChecked)
|
PrefManager.setVal(PrefName.LogToFile, isChecked)
|
||||||
restartApp()
|
restartApp()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsShareLog.setOnClickListener {
|
bindingAbout.settingsShareLog.setOnClickListener {
|
||||||
Logger.shareLog(this)
|
Logger.shareLog(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.settingsAccountHelp.setOnClickListener {
|
bindingAccounts.settingsAccountHelp.setOnClickListener {
|
||||||
val title = getString(R.string.account_help)
|
val title = getString(R.string.account_help)
|
||||||
val full = getString(R.string.full_account_help)
|
val full = getString(R.string.full_account_help)
|
||||||
CustomBottomDialog.newInstance().apply {
|
CustomBottomDialog.newInstance().apply {
|
||||||
|
@ -863,48 +887,48 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
|
|
||||||
fun reload() {
|
fun reload() {
|
||||||
if (Anilist.token != null) {
|
if (Anilist.token != null) {
|
||||||
binding.settingsAnilistLogin.setText(R.string.logout)
|
bindingAccounts.settingsAnilistLogin.setText(R.string.logout)
|
||||||
binding.settingsAnilistLogin.setOnClickListener {
|
bindingAccounts.settingsAnilistLogin.setOnClickListener {
|
||||||
Anilist.removeSavedToken()
|
Anilist.removeSavedToken()
|
||||||
restartMainActivity.isEnabled = true
|
restartMainActivity.isEnabled = true
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
binding.settingsAnilistUsername.visibility = View.VISIBLE
|
bindingAccounts.settingsAnilistUsername.visibility = View.VISIBLE
|
||||||
binding.settingsAnilistUsername.text = Anilist.username
|
bindingAccounts.settingsAnilistUsername.text = Anilist.username
|
||||||
binding.settingsAnilistAvatar.loadImage(Anilist.avatar)
|
bindingAccounts.settingsAnilistAvatar.loadImage(Anilist.avatar)
|
||||||
|
|
||||||
binding.settingsMALLoginRequired.visibility = View.GONE
|
bindingAccounts.settingsMALLoginRequired.visibility = View.GONE
|
||||||
binding.settingsMALLogin.visibility = View.VISIBLE
|
bindingAccounts.settingsMALLogin.visibility = View.VISIBLE
|
||||||
binding.settingsMALUsername.visibility = View.VISIBLE
|
bindingAccounts.settingsMALUsername.visibility = View.VISIBLE
|
||||||
|
|
||||||
if (MAL.token != null) {
|
if (MAL.token != null) {
|
||||||
binding.settingsMALLogin.setText(R.string.logout)
|
bindingAccounts.settingsMALLogin.setText(R.string.logout)
|
||||||
binding.settingsMALLogin.setOnClickListener {
|
bindingAccounts.settingsMALLogin.setOnClickListener {
|
||||||
MAL.removeSavedToken(it.context)
|
MAL.removeSavedToken(it.context)
|
||||||
restartMainActivity.isEnabled = true
|
restartMainActivity.isEnabled = true
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
binding.settingsMALUsername.visibility = View.VISIBLE
|
bindingAccounts.settingsMALUsername.visibility = View.VISIBLE
|
||||||
binding.settingsMALUsername.text = MAL.username
|
bindingAccounts.settingsMALUsername.text = MAL.username
|
||||||
binding.settingsMALAvatar.loadImage(MAL.avatar)
|
bindingAccounts.settingsMALAvatar.loadImage(MAL.avatar)
|
||||||
} else {
|
} else {
|
||||||
binding.settingsMALAvatar.setImageResource(R.drawable.ic_round_person_24)
|
bindingAccounts.settingsMALAvatar.setImageResource(R.drawable.ic_round_person_24)
|
||||||
binding.settingsMALUsername.visibility = View.GONE
|
bindingAccounts.settingsMALUsername.visibility = View.GONE
|
||||||
binding.settingsMALLogin.setText(R.string.login)
|
bindingAccounts.settingsMALLogin.setText(R.string.login)
|
||||||
binding.settingsMALLogin.setOnClickListener {
|
bindingAccounts.settingsMALLogin.setOnClickListener {
|
||||||
MAL.loginIntent(this)
|
MAL.loginIntent(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.settingsAnilistAvatar.setImageResource(R.drawable.ic_round_person_24)
|
bindingAccounts.settingsAnilistAvatar.setImageResource(R.drawable.ic_round_person_24)
|
||||||
binding.settingsAnilistUsername.visibility = View.GONE
|
bindingAccounts.settingsAnilistUsername.visibility = View.GONE
|
||||||
binding.settingsAnilistLogin.setText(R.string.login)
|
bindingAccounts.settingsAnilistLogin.setText(R.string.login)
|
||||||
binding.settingsAnilistLogin.setOnClickListener {
|
bindingAccounts.settingsAnilistLogin.setOnClickListener {
|
||||||
Anilist.loginIntent(this)
|
Anilist.loginIntent(this)
|
||||||
}
|
}
|
||||||
binding.settingsMALLoginRequired.visibility = View.VISIBLE
|
bindingAccounts.settingsMALLoginRequired.visibility = View.VISIBLE
|
||||||
binding.settingsMALLogin.visibility = View.GONE
|
bindingAccounts.settingsMALLogin.visibility = View.GONE
|
||||||
binding.settingsMALUsername.visibility = View.GONE
|
bindingAccounts.settingsMALUsername.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Discord.token != null) {
|
if (Discord.token != null) {
|
||||||
|
@ -912,29 +936,29 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
val avatar = PrefManager.getVal(PrefName.DiscordAvatar, null as String?)
|
val avatar = PrefManager.getVal(PrefName.DiscordAvatar, null as String?)
|
||||||
val username = PrefManager.getVal(PrefName.DiscordUserName, null as String?)
|
val username = PrefManager.getVal(PrefName.DiscordUserName, null as String?)
|
||||||
if (id != null && avatar != null) {
|
if (id != null && avatar != null) {
|
||||||
binding.settingsDiscordAvatar.loadImage("https://cdn.discordapp.com/avatars/$id/$avatar.png")
|
bindingAccounts.settingsDiscordAvatar.loadImage("https://cdn.discordapp.com/avatars/$id/$avatar.png")
|
||||||
}
|
}
|
||||||
binding.settingsDiscordUsername.visibility = View.VISIBLE
|
bindingAccounts.settingsDiscordUsername.visibility = View.VISIBLE
|
||||||
binding.settingsDiscordUsername.text =
|
bindingAccounts.settingsDiscordUsername.text =
|
||||||
username ?: Discord.token?.replace(Regex("."), "*")
|
username ?: Discord.token?.replace(Regex("."), "*")
|
||||||
binding.settingsDiscordLogin.setText(R.string.logout)
|
bindingAccounts.settingsDiscordLogin.setText(R.string.logout)
|
||||||
binding.settingsDiscordLogin.setOnClickListener {
|
bindingAccounts.settingsDiscordLogin.setOnClickListener {
|
||||||
Discord.removeSavedToken(this)
|
Discord.removeSavedToken(this)
|
||||||
restartMainActivity.isEnabled = true
|
restartMainActivity.isEnabled = true
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.imageSwitcher.visibility = View.VISIBLE
|
bindingAccounts.imageSwitcher.visibility = View.VISIBLE
|
||||||
var initialStatus = when (PrefManager.getVal<String>(PrefName.DiscordStatus)) {
|
var initialStatus = when (PrefManager.getVal<String>(PrefName.DiscordStatus)) {
|
||||||
"online" -> R.drawable.discord_status_online
|
"online" -> R.drawable.discord_status_online
|
||||||
"idle" -> R.drawable.discord_status_idle
|
"idle" -> R.drawable.discord_status_idle
|
||||||
"dnd" -> R.drawable.discord_status_dnd
|
"dnd" -> R.drawable.discord_status_dnd
|
||||||
else -> R.drawable.discord_status_online
|
else -> R.drawable.discord_status_online
|
||||||
}
|
}
|
||||||
binding.imageSwitcher.setImageResource(initialStatus)
|
bindingAccounts.imageSwitcher.setImageResource(initialStatus)
|
||||||
|
|
||||||
val zoomInAnimation = AnimationUtils.loadAnimation(this, R.anim.bounce_zoom)
|
val zoomInAnimation = AnimationUtils.loadAnimation(this, R.anim.bounce_zoom)
|
||||||
binding.imageSwitcher.setOnClickListener {
|
bindingAccounts.imageSwitcher.setOnClickListener {
|
||||||
var status = "online"
|
var status = "online"
|
||||||
initialStatus = when (initialStatus) {
|
initialStatus = when (initialStatus) {
|
||||||
R.drawable.discord_status_online -> {
|
R.drawable.discord_status_online -> {
|
||||||
|
@ -953,15 +977,15 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
||||||
}
|
}
|
||||||
|
|
||||||
PrefManager.setVal(PrefName.DiscordStatus, status)
|
PrefManager.setVal(PrefName.DiscordStatus, status)
|
||||||
binding.imageSwitcher.setImageResource(initialStatus)
|
bindingAccounts.imageSwitcher.setImageResource(initialStatus)
|
||||||
binding.imageSwitcher.startAnimation(zoomInAnimation)
|
bindingAccounts.imageSwitcher.startAnimation(zoomInAnimation)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
binding.imageSwitcher.visibility = View.GONE
|
bindingAccounts.imageSwitcher.visibility = View.GONE
|
||||||
binding.settingsDiscordAvatar.setImageResource(R.drawable.ic_round_person_24)
|
bindingAccounts.settingsDiscordAvatar.setImageResource(R.drawable.ic_round_person_24)
|
||||||
binding.settingsDiscordUsername.visibility = View.GONE
|
bindingAccounts.settingsDiscordUsername.visibility = View.GONE
|
||||||
binding.settingsDiscordLogin.setText(R.string.login)
|
bindingAccounts.settingsDiscordLogin.setText(R.string.login)
|
||||||
binding.settingsDiscordLogin.setOnClickListener {
|
bindingAccounts.settingsDiscordLogin.setOnClickListener {
|
||||||
Discord.warning(this).show(supportFragmentManager, "dialog")
|
Discord.warning(this).show(supportFragmentManager, "dialog")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
189
app/src/main/res/layout/activity_settings_about.xml
Normal file
189
app/src/main/res/layout/activity_settings_about.xml
Normal file
|
@ -0,0 +1,189 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<ani.dantotsu.others.Xpandable
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:isExpanded="false">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/about"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||||
|
tools:ignore="TextContrastCheck" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsFAQ"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:backgroundTint="?attr/colorOnBackground"
|
||||||
|
android:backgroundTintMode="src_atop"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/faq"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_help_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsCheckUpdate"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:drawableStart="@drawable/ic_round_new_releases_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/check_app_updates"
|
||||||
|
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
|
||||||
|
android:id="@+id/settingsShareUsername"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_search_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/share_username_in_crash_reports"
|
||||||
|
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
|
||||||
|
android:id="@+id/settingsLogToFile"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_edit_note_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/log_to_file"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/logging_warning" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/settingsShareLog"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_share_24"
|
||||||
|
android:padding="16dp" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsDev"
|
||||||
|
style="@style/Widget.Material3.Button.TextButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/devs"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_accessible_forward_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsForks"
|
||||||
|
style="@style/Widget.Material3.Button.TextButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/forks"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_restaurant_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsDisclaimer"
|
||||||
|
style="@style/Widget.Material3.Button.TextButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/disclaimer"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_info_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
|
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
264
app/src/main/res/layout/activity_settings_accounts.xml
Normal file
264
app/src/main/res/layout/activity_settings_accounts.xml
Normal file
|
@ -0,0 +1,264 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/accounts"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||||
|
tools:ignore="TextContrastCheck" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settingsAnilistLoginContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:layout_marginEnd="20dp"
|
||||||
|
android:contentDescription="@string/anilist"
|
||||||
|
app:srcCompat="@drawable/ic_anilist"
|
||||||
|
app:tint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsAnilistUsername"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-4dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/username"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsAnilistLogin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="-16dp"
|
||||||
|
android:layout_marginBottom="-16dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:text="@string/logout"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/settingsAnilistAvatarContainer"
|
||||||
|
android:layout_width="51dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:backgroundTint="@color/nav_bg_inv"
|
||||||
|
app:cardCornerRadius="26dp">
|
||||||
|
|
||||||
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
android:id="@+id/settingsAnilistAvatar"
|
||||||
|
android:layout_width="51dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
app:srcCompat="@drawable/ic_round_person_24"
|
||||||
|
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settingsMalLoginContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="31dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:contentDescription="@string/myanimelist"
|
||||||
|
app:srcCompat="@drawable/ic_myanimelist"
|
||||||
|
app:tint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsMALLoginRequired"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0.5"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/login_with_anilist"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsMALUsername"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-4dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/username"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsMALLogin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="-16dp"
|
||||||
|
android:layout_marginBottom="-16dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:text="@string/logout"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/settingsMALAvatarContainer"
|
||||||
|
android:layout_width="51dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:backgroundTint="@color/nav_bg_inv"
|
||||||
|
app:cardCornerRadius="26dp">
|
||||||
|
|
||||||
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
android:id="@+id/settingsMALAvatar"
|
||||||
|
android:layout_width="51dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
app:srcCompat="@drawable/ic_round_person_24"
|
||||||
|
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/settingsDiscordLoginContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
tools:ignore="ExtraText">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="31dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:src="@drawable/ic_discord"
|
||||||
|
app:tint="?attr/colorPrimary"
|
||||||
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsDiscordUsername"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-4dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@string/username"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsDiscordLogin"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="-16dp"
|
||||||
|
android:layout_marginBottom="-16dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:text="@string/logout"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageSwitcher"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/discord_status_idle"
|
||||||
|
android:onClick="onImageClicked"
|
||||||
|
android:padding="16dp" />
|
||||||
|
|
||||||
|
<com.google.android.material.card.MaterialCardView
|
||||||
|
android:id="@+id/settingsDiscordAvatarContainer"
|
||||||
|
android:layout_width="51dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:backgroundTint="@color/nav_bg_inv"
|
||||||
|
app:cardCornerRadius="26dp">
|
||||||
|
|
||||||
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
|
android:id="@+id/settingsDiscordAvatar"
|
||||||
|
android:layout_width="51dp"
|
||||||
|
android:layout_height="51dp"
|
||||||
|
android:scaleType="center"
|
||||||
|
app:srcCompat="@drawable/ic_round_person_24"
|
||||||
|
tools:ignore="ContentDescription,ImageContrastCheck" />
|
||||||
|
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/settingsAccountHelp"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="?android:colorBackground"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/account_help"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableStartCompat="@drawable/ic_round_help_24"
|
||||||
|
app:drawableTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
198
app/src/main/res/layout/activity_settings_anime.xml
Normal file
198
app/src/main/res/layout/activity_settings_anime.xml
Normal file
|
@ -0,0 +1,198 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/anime"
|
||||||
|
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="match_parent"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/default_ep_view" />
|
||||||
|
|
||||||
|
<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/settingsEpList"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_view_list_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/settingsEpGrid"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:scaleX="-1"
|
||||||
|
android:src="@drawable/ic_round_grid_view_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/settingsEpCompact"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_view_comfy_24"
|
||||||
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsPlayer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:backgroundTint="?attr/colorSecondary"
|
||||||
|
android:backgroundTintMode="src_atop"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/player_settings"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_video_settings_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/purgeAnimeDownloads"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/purge_anime_downloads"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_delete_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsPreferDub"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_audiotrack_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/prefer_dub"
|
||||||
|
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
|
||||||
|
android:id="@+id/settingsShowYt"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:checked="true"
|
||||||
|
android:drawableStart="@drawable/ic_round_play_circle_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/show_yt"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
284
app/src/main/res/layout/activity_settings_common.xml
Normal file
284
app/src/main/res/layout/activity_settings_common.xml
Normal file
|
@ -0,0 +1,284 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/common"
|
||||||
|
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="match_parent"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/startUpTab" />
|
||||||
|
|
||||||
|
<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/uiSettingsAnime"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_movie_filter_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/uiSettingsHome"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:scaleX="-1"
|
||||||
|
android:src="@drawable/ic_round_home_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/uiSettingsManga"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_import_contacts_24"
|
||||||
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsUi"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/ui_settings"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_auto_awesome_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsDownloadManager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:backgroundTint="?attr/colorSecondary"
|
||||||
|
android:backgroundTintMode="src_atop"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/download_manager_select"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_download_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/importExportSettings"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:backgroundTint="?attr/colorSecondary"
|
||||||
|
android:backgroundTintMode="src_atop"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/import_export_settings"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_download_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<!--TODO: Add support for SD card-->
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsDownloadInSd"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_sd_card_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:enabled="false"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/downloadInSd"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/selected_dns" />
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
|
app:boxCornerRadiusTopEnd="8dp"
|
||||||
|
app:boxCornerRadiusTopStart="8dp"
|
||||||
|
app:hintAnimationEnabled="true"
|
||||||
|
app:startIconDrawable="@drawable/ic_round_dns_24">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/settingsExtensionDns"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:text="@string/none"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsContinueMedia"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="true"
|
||||||
|
android:drawableStart="@drawable/ic_round_play_disabled_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/always_continue_shows"
|
||||||
|
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
|
||||||
|
android:id="@+id/settingsRecentlyListOnly"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_new_releases_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/recentlyListOnly"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
115
app/src/main/res/layout/activity_settings_extensions.xml
Normal file
115
app/src/main/res/layout/activity_settings_extensions.xml
Normal file
|
@ -0,0 +1,115 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/extensions_settings"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||||
|
tools:ignore="TextContrastCheck" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/userAgent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:backgroundTint="?attr/colorSecondary"
|
||||||
|
android:backgroundTintMode="src_atop"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/user_agent"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_video_settings_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsForceLegacyInstall"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_new_releases_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/force_legacy_installer"
|
||||||
|
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
|
||||||
|
android:id="@+id/skipExtensionIcons"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_no_icon_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/skip_loading_extension_icons"
|
||||||
|
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
|
||||||
|
android:id="@+id/NSFWExtension"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_nsfw_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/NSFWExtention"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
170
app/src/main/res/layout/activity_settings_manga.xml
Normal file
170
app/src/main/res/layout/activity_settings_manga.xml
Normal file
|
@ -0,0 +1,170 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/manga"
|
||||||
|
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="match_parent"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/default_chp_view" />
|
||||||
|
|
||||||
|
<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/settingsChpList"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_view_list_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/settingsChpCompact"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_view_comfy_24"
|
||||||
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsReader"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/reader_settings"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_reader_settings"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/purgeMangaDownloads"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/purge_manga_downloads"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_delete_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/purgeNovelDownloads"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/purge_novel_downloads"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_delete_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
160
app/src/main/res/layout/activity_settings_notifications.xml
Normal file
160
app/src/main/res/layout/activity_settings_notifications.xml
Normal file
|
@ -0,0 +1,160 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/notifications"
|
||||||
|
android:textColor="?attr/colorSecondary"
|
||||||
|
app:drawableEndCompat="@drawable/ic_round_arrow_drop_down_24"
|
||||||
|
tools:ignore="TextContrastCheck" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsSubscriptionsTime"
|
||||||
|
style="@style/Widget.Material3.Button.TextButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-11dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:text="@string/subscriptions_checking_time_s"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_notifications_none_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
|
|
||||||
|
<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="@string/subscriptions_info"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsAnilistNotifications"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/anilist_notification_filters"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_anilist"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsAnilistSubscriptionsTime"
|
||||||
|
style="@style/Widget.Material3.Button.TextButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-11dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:text="@string/anilist_notifications_checking_time"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_notifications_none_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/settingsCommentSubscriptionsTime"
|
||||||
|
style="@style/Widget.Material3.Button.TextButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-11dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:text="@string/comment_notification_checking_time"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_notifications_none_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsNotificationsCheckingSubscriptions"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
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:text="@string/notification_for_checking_subscriptions"
|
||||||
|
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
|
||||||
|
android:id="@+id/settingsNotificationsUseAlarmManager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_new_releases_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/use_alarm_manager"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
251
app/src/main/res/layout/activity_settings_theme.xml
Normal file
251
app/src/main/res/layout/activity_settings_theme.xml
Normal file
|
@ -0,0 +1,251 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge 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">
|
||||||
|
<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:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/theme"
|
||||||
|
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="match_parent"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/theme" />
|
||||||
|
|
||||||
|
<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/settingsUiLight"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_brightness_high_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/settingsUiDark"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:scaleX="-1"
|
||||||
|
android:src="@drawable/ic_round_brightness_4_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/settingsUiAuto"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:alpha="0.33"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:src="@drawable/ic_round_brightness_auto_24"
|
||||||
|
app:tint="?attr/colorOnBackground"
|
||||||
|
tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:boxCornerRadiusBottomEnd="8dp"
|
||||||
|
app:boxCornerRadiusBottomStart="8dp"
|
||||||
|
app:boxCornerRadiusTopEnd="8dp"
|
||||||
|
app:boxCornerRadiusTopStart="8dp"
|
||||||
|
app:hintAnimationEnabled="true"
|
||||||
|
app:startIconDrawable="@drawable/ic_round_source_24">
|
||||||
|
|
||||||
|
<AutoCompleteTextView
|
||||||
|
android:id="@+id/themeSwitcher"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:freezesText="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:text="@string/watch"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
android:textSize="14sp"
|
||||||
|
tools:ignore="LabelFor,TextContrastCheck,DuplicateSpeakableTextCheck" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsUseOLED"
|
||||||
|
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="@string/oled_theme_variant"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/themeDivider1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:gravity="center"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:text="@string/requires_android_12"
|
||||||
|
android:textColor="?attr/colorSecondary" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsUseMaterialYou"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_round_new_releases_24"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/use_material_you"
|
||||||
|
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
|
||||||
|
android:id="@+id/settingsUseSourceTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_palette"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/use_unique_theme_for_each_item"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="-11dp"
|
||||||
|
android:alpha="0.58"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:text="@string/custom_theme" />
|
||||||
|
|
||||||
|
<com.google.android.material.materialswitch.MaterialSwitch
|
||||||
|
android:id="@+id/settingsUseCustomTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:checked="false"
|
||||||
|
android:drawableStart="@drawable/ic_palette"
|
||||||
|
android:drawablePadding="16dp"
|
||||||
|
android:elegantTextHeight="true"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:minHeight="64dp"
|
||||||
|
android:text="@string/use_custom_theme"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:drawableTint="?attr/colorPrimary"
|
||||||
|
app:showText="false"
|
||||||
|
app:thumbTint="@color/button_switch_track" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/customTheme"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="64dp"
|
||||||
|
android:layout_marginStart="-31dp"
|
||||||
|
android:layout_marginEnd="-31dp"
|
||||||
|
android:background="@drawable/ui_bg"
|
||||||
|
android:backgroundTint="?attr/colorSecondary"
|
||||||
|
android:backgroundTintMode="src_atop"
|
||||||
|
android:fontFamily="@font/poppins_bold"
|
||||||
|
android:insetTop="0dp"
|
||||||
|
android:insetBottom="0dp"
|
||||||
|
android:paddingStart="31dp"
|
||||||
|
android:paddingEnd="31dp"
|
||||||
|
android:text="@string/color_picker"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
|
android:textAllCaps="false"
|
||||||
|
android:textColor="?attr/colorOnBackground"
|
||||||
|
app:cornerRadius="0dp"
|
||||||
|
app:icon="@drawable/ic_round_color_picker_24"
|
||||||
|
app:iconPadding="16dp"
|
||||||
|
app:iconSize="24dp"
|
||||||
|
app:iconTint="?attr/colorPrimary" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/themeDivider2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_marginStart="-16dp"
|
||||||
|
android:layout_marginEnd="-16dp"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:background="?android:attr/listDivider" />
|
||||||
|
|
||||||
|
</ani.dantotsu.others.Xpandable>
|
||||||
|
</merge>
|
Loading…
Add table
Add a link
Reference in a new issue