mirror of
https://github.com/He4eT/yamf_launcher.git
synced 2026-05-05 01:47:24 +00:00
Refactoring
This commit is contained in:
parent
033fff6820
commit
c7c24411cf
1 changed files with 10 additions and 10 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue