Dynamic colors [1/2]
This commit is contained in:
@@ -20,10 +20,8 @@
|
||||
package com.aurora.extensions
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
fun View.isVisible() = visibility == View.VISIBLE
|
||||
|
||||
@@ -84,10 +82,3 @@ fun View.flip(resetToZero: Boolean = true, duration: Long = 400) {
|
||||
fun View.getString(resourceId: Int): String {
|
||||
return context.getString(resourceId)
|
||||
}
|
||||
|
||||
fun FloatingActionButton.applyColors() {
|
||||
val accentColor = context.accentColor()
|
||||
backgroundTintList = ColorStateList.valueOf(accentColor)
|
||||
imageTintList = ColorStateList.valueOf(contrastingColor(accentColor))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user