Refactoring

This commit is contained in:
ottoptj 2024-08-11 18:38:07 +03:00
commit c7c24411cf

View file

@ -55,16 +55,6 @@ class UIUtils(context: Context) {
} }
} }
private fun setAlpha(color: Int, alphaHex: String): Int {
val newAlpha = Integer.parseInt(alphaHex, 16)
val r = Color.red(color)
val g = Color.green(color)
val b = Color.blue(color)
return Color.argb(newAlpha, r, g, b)
}
fun setSearchColors(searchView: TextInputEditText) { fun setSearchColors(searchView: TextInputEditText) {
val viewTreeObserver = searchView.viewTreeObserver val viewTreeObserver = searchView.viewTreeObserver
@ -83,6 +73,16 @@ class UIUtils(context: Context) {
} }
} }
private fun setAlpha(color: Int, alphaHex: String): Int {
val newAlpha = Integer.parseInt(alphaHex, 16)
val r = Color.red(color)
val g = Color.green(color)
val b = Color.blue(color)
return Color.argb(newAlpha, r, g, b)
}
// Alignment // Alignment
fun setClockAlignment(clock: TextClock, dateText: TextClock) { fun setClockAlignment(clock: TextClock, dateText: TextClock) {
val alignment = sharedPreferenceManager.getClockAlignment() val alignment = sharedPreferenceManager.getClockAlignment()