From c7c24411cfc6e67ddf943dc307d7d872890ee6f5 Mon Sep 17 00:00:00 2001 From: ottoptj Date: Sun, 11 Aug 2024 18:38:07 +0300 Subject: [PATCH] Refactoring --- .../main/java/eu/ottop/yamlauncher/UIUtils.kt | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/eu/ottop/yamlauncher/UIUtils.kt b/app/src/main/java/eu/ottop/yamlauncher/UIUtils.kt index 3c19bd5..bb4ee84 100644 --- a/app/src/main/java/eu/ottop/yamlauncher/UIUtils.kt +++ b/app/src/main/java/eu/ottop/yamlauncher/UIUtils.kt @@ -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) { 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 fun setClockAlignment(clock: TextClock, dateText: TextClock) { val alignment = sharedPreferenceManager.getClockAlignment()