Fix edit text handle colors

This commit is contained in:
h4h13 2019-07-31 03:16:50 +05:30
parent 1145405832
commit b7ed2488f2
9 changed files with 72 additions and 115 deletions

View file

@ -17,7 +17,10 @@ package code.name.monkey.retromusic.extensions
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.EditText
import androidx.annotation.LayoutRes
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.TintHelper
@Suppress("UNCHECKED_CAST")
@ -33,4 +36,9 @@ fun View.hide() {
visibility = View.GONE
}
fun View.showOrHide(show: Boolean) = if (show) show() else hide()
fun View.showOrHide(show: Boolean) = if (show) show() else hide()
fun EditText.appHandleColor(): EditText {
TintHelper.colorHandles(this, ThemeStore.accentColor(context))
return this
}