Added navigation graph for settings
This commit is contained in:
parent
0ebcbd9434
commit
373befcd83
39 changed files with 713 additions and 114 deletions
|
@ -1,6 +1,7 @@
|
|||
package code.name.monkey.appthemehelper.util
|
||||
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import com.google.android.material.button.MaterialButton
|
||||
import com.google.android.material.textfield.TextInputLayout
|
||||
|
@ -36,6 +37,20 @@ object MaterialUtil {
|
|||
}
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
@JvmStatic
|
||||
fun tintColor(
|
||||
button: MaterialButton,
|
||||
textColor: Int = Color.WHITE,
|
||||
backgroundColor: Int = Color.BLACK
|
||||
) {
|
||||
val backgroundColorStateList = ColorStateList.valueOf(backgroundColor)
|
||||
val textColorColorStateList = ColorStateList.valueOf(textColor)
|
||||
button.backgroundTintList = backgroundColorStateList
|
||||
button.setTextColor(textColorColorStateList)
|
||||
button.iconTint = textColorColorStateList
|
||||
}
|
||||
|
||||
@JvmOverloads
|
||||
@JvmStatic
|
||||
fun setTint(textInputLayout: TextInputLayout, background: Boolean = true) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue