mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-07 09:38:52 -06:00
Konvert StyledResources
Co-authored-by: Alinson S. Xavier <git@axavier.org>
This commit is contained in:
@@ -9,7 +9,7 @@ object PaletteUtils {
|
||||
|
||||
@JvmStatic
|
||||
fun colorToPaletteIndex(context: Context, color: Int): Int {
|
||||
val palette = StyledResources(context).palette
|
||||
val palette = StyledResources(context).getPalette()
|
||||
return palette.indexOf(color)
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ object PaletteUtils {
|
||||
|
||||
@JvmStatic
|
||||
fun getColor(context: Context, paletteColor: Int): Int {
|
||||
val palette = StyledResources(context).palette
|
||||
val palette = StyledResources(context).getPalette()
|
||||
return if (paletteColor in palette.indices) {
|
||||
palette[paletteColor]
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user