VancedManager/app/src/main/java/com/vanced/manager/ui/dialogs/ManagerAccentColorDialog.kt

128 lines
4.6 KiB
Kotlin
Raw Normal View History

2020-10-31 19:45:39 +00:00
package com.vanced.manager.ui.dialogs
2020-12-18 19:58:54 +00:00
import android.content.DialogInterface
2020-12-14 21:18:58 +00:00
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
2020-10-31 19:45:39 +00:00
import android.os.Bundle
2020-12-15 07:32:47 +00:00
import android.text.Editable
import android.text.TextWatcher
2020-10-31 19:45:39 +00:00
import android.view.LayoutInflater
import android.view.ViewGroup
2020-12-14 21:18:58 +00:00
import android.widget.TextView
import android.widget.Toast
2020-10-31 19:45:39 +00:00
import androidx.preference.PreferenceManager.getDefaultSharedPreferences
2020-12-14 21:18:58 +00:00
import com.madrapps.pikolo.listeners.OnColorSelectionListener
import com.vanced.manager.R
import com.vanced.manager.core.ui.base.BindingDialogFragment
2020-10-31 19:45:39 +00:00
import com.vanced.manager.databinding.DialogManagerAccentColorBinding
import com.vanced.manager.utils.*
2021-02-03 18:24:28 +00:00
import com.vanced.manager.utils.AppUtils.log
2020-10-31 19:45:39 +00:00
2020-12-14 21:18:58 +00:00
class ManagerAccentColorDialog : BindingDialogFragment<DialogManagerAccentColorBinding>() {
companion object {
fun newInstance(): ManagerAccentColorDialog = ManagerAccentColorDialog().apply {
arguments = Bundle()
}
}
2020-10-31 19:45:39 +00:00
private val prefs by lazy { getDefaultSharedPreferences(requireActivity()) }
override fun binding(
2020-10-31 19:45:39 +00:00
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
) = DialogManagerAccentColorBinding.inflate(inflater, container, false)
override fun otherSetups() {
dialog?.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
bindData()
2020-12-18 19:58:54 +00:00
}
override fun onCancel(dialog: DialogInterface) {
super.onCancel(dialog)
2020-12-19 16:09:42 +00:00
mutableAccentColor.value = prefs.getInt("manager_accent_color", defAccentColor)
2020-10-31 19:45:39 +00:00
}
private fun bindData() {
with(binding) {
2020-12-19 16:09:42 +00:00
val accent = prefs.getInt("manager_accent_color", defAccentColor)
2020-12-15 07:32:47 +00:00
hexEdittext.apply {
setText(accent.toHex(), TextView.BufferType.EDITABLE)
addTextChangedListener(object : TextWatcher {
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
override fun beforeTextChanged(
s: CharSequence?,
start: Int,
count: Int,
after: Int
) {
}
2020-12-15 07:32:47 +00:00
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
override fun onTextChanged(
s: CharSequence?,
start: Int,
before: Int,
count: Int
) {
2020-12-15 07:32:47 +00:00
if (length() == 0) {
setText("#")
setSelection(1)
}
if (accentColor.value?.toHex() != text.toString() && length() == 7) {
try {
val colorFromEditText = Color.parseColor(text.toString())
accentPicker.setColor(colorFromEditText)
mutableAccentColor.value = colorFromEditText
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
} catch (e: IllegalArgumentException) {
}
2020-12-15 07:32:47 +00:00
}
}
override fun afterTextChanged(s: Editable?) {}
})
}
2020-12-14 21:18:58 +00:00
accentPicker.apply {
setColor(accent)
setColorSelectionListener(object : OnColorSelectionListener {
override fun onColorSelected(color: Int) {
mutableAccentColor.value = color
hexEdittext.setText(color.toHex(), TextView.BufferType.EDITABLE)
}
2020-12-15 07:32:47 +00:00
override fun onColorSelectionEnd(color: Int) {}
2020-12-14 21:18:58 +00:00
2020-12-15 07:32:47 +00:00
override fun onColorSelectionStart(color: Int) {}
2020-12-14 21:18:58 +00:00
})
}
2020-12-15 08:23:27 +00:00
accentCancel.setOnClickListener {
mutableAccentColor.value = accent
dismiss()
}
accentSave.setOnClickListener {
2020-12-14 21:18:58 +00:00
try {
2020-12-15 07:32:47 +00:00
val colorFromEditText = Color.parseColor(hexEdittext.text.toString())
mutableAccentColor.value = colorFromEditText
prefs.managerAccent = colorFromEditText
2020-12-14 21:18:58 +00:00
} catch (e: IllegalArgumentException) {
2021-02-03 18:24:28 +00:00
log("VMTheme", getString(R.string.failed_accent))
Vanced Manager 2.6.0 (#516) * updated app card UI * bug fixes * fixed grammar * removed unnoticable animation to improve performance * removed useless attribute * kotlin extensions are stonks * reference accent color variable instead of getting preference value every time * updated old stuff * removed useless check inside 'when' statement * optimised lifecycleOwner getter * property access syntax goes brrrrr * small accent update * added progress indicators to download dialogs * fixed changelog not appearing when pressing card in about menu * bumped up kotlin to 1.4.31 * fixed #437 * fixed #435 * fixed viewpager navigation on RTL layout * added a check for session id in root installer * updated strings * always notify about miui error * only run 1 animation at once * require external storage * sorted strings xml * improved layouts to look more close to each other * bumped up dependencies * updated version * fixed crash on manager update * New Crowdin updates (#489) * New translations strings.xml (Romanian) * New translations strings.xml (Bengali) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (Swedish) * New translations strings.xml (Turkish) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Marathi) * New translations strings.xml (Portuguese) * New translations strings.xml (Thai) * New translations strings.xml (Croatian) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Russian) * New translations strings.xml (Polish) * New translations strings.xml (Arabic) * New translations strings.xml (Spanish) * New translations strings.xml (Slovak) * New translations strings.xml (Malayalam) * New translations strings.xml (Japanese) * New translations strings.xml (Estonian) * New translations strings.xml (French) * New translations strings.xml (Kurdish) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Hungarian) * New translations strings.xml (Finnish) * New translations strings.xml (Korean) * New translations strings.xml (Afrikaans) * New translations strings.xml (Punjabi) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Hebrew) * New translations strings.xml (Italian) * New translations strings.xml (Georgian) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi, Pakistan) * Added button info on long press * preview adjustments to navigation xml * moved splash screen activity to parent dir * fixed buttontag getter * updated readme * fixed readme * Added build section to readme * Updated build instructions * prevent stacktrace from obfuscating * Added an option to switch between internal and external storage * removed warning for music vanced * added back a fix for split installer * added -r option for root music installer * Revert "prevent stacktrace from obfuscating" This reverts commit 2d30eb60af11f2d854c826953c025702c2e161ce. * Revert "added back a fix for split installer" This reverts commit aeaa0d445ec7cd6d2c318bf3f3751f8759d89801. * Revert "Added an option to switch between internal and external storage" This reverts commit 98c4b88961d14f36acf908bcee2376c1f79af86e. * reverted all storage-related commits * prevent stacktrace ovfuscation * updated readme * updated base url * use storage perms only on android 5 * cleanup * removed unused event file * fixed dark overlay not disappearing after bottom dialog has been dismissed * removed unecessary path from file_provider * fixed lint for core-ui * improved layout flexibility * updated icons in expandable app item * removed path prefix for api urls * removed microg bug dialog * fixed version code comparison * New translations strings.xml (Romanian) * New translations strings.xml (Croatian) * New translations strings.xml (Ukrainian) * New translations strings.xml (Chinese Simplified) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Vietnamese) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Indonesian) * New translations strings.xml (Tamil) * New translations strings.xml (Bengali) * New translations strings.xml (Marathi) * New translations strings.xml (Thai) * New translations strings.xml (Estonian) * New translations strings.xml (Swedish) * New translations strings.xml (Azerbaijani) * New translations strings.xml (Hindi) * New translations strings.xml (Filipino) * New translations strings.xml (Malayalam) * New translations strings.xml (Sinhala) * New translations strings.xml (Bengali, India) * New translations strings.xml (Kurmanji (Kurdish)) * New translations strings.xml (Sorani (Kurdish)) * New translations strings.xml (Pashto) * New translations strings.xml (Somali) * New translations strings.xml (Punjabi, Pakistan) * New translations strings.xml (Turkish) * New translations strings.xml (Serbian (Cyrillic)) * New translations strings.xml (French) * New translations strings.xml (Hebrew) * New translations strings.xml (Spanish) * New translations strings.xml (Afrikaans) * New translations strings.xml (Arabic) * New translations strings.xml (Bulgarian) * New translations strings.xml (Catalan) * New translations strings.xml (Czech) * New translations strings.xml (Danish) * New translations strings.xml (German) * New translations strings.xml (Greek) * New translations strings.xml (Finnish) * New translations strings.xml (Hungarian) * New translations strings.xml (Slovak) * New translations strings.xml (Italian) * New translations strings.xml (Japanese) * New translations strings.xml (Georgian) * New translations strings.xml (Korean) * New translations strings.xml (Kurdish) * New translations strings.xml (Dutch) * New translations strings.xml (Norwegian) * New translations strings.xml (Punjabi) * New translations strings.xml (Polish) * New translations strings.xml (Portuguese) * New translations strings.xml (Russian) * New translations strings.xml (Lithuanian) * New translations strings.xml (Portuguese, Brazilian) * New translations strings.xml (Arabic) * New translations strings.xml (Slovak) * New translations strings.xml (Korean) * New translations strings.xml (Polish) * New Crowdin updates (#515) * New translations strings.xml (Arabic) * New translations strings.xml (Greek) * New translations strings.xml (Dutch) * New translations strings.xml (Turkish) * New translations strings.xml (Chinese Traditional) * New translations strings.xml (Indonesian) Co-authored-by: X1nto <burtkni@yandex.ru> Co-authored-by: Tornike Khintibidze <48173186+X1nto@users.noreply.github.com>
2021-04-27 12:16:14 +00:00
Toast.makeText(
requireActivity(),
getString(R.string.failed_accent),
Toast.LENGTH_SHORT
).show()
2020-12-14 21:18:58 +00:00
return@setOnClickListener
}
2020-12-14 21:18:58 +00:00
dismiss()
}
accentReset.setOnClickListener {
prefs.managerAccent = defAccentColor
2020-12-14 21:18:58 +00:00
mutableAccentColor.value = defAccentColor
dismiss()
2020-10-31 19:45:39 +00:00
}
}
}
}