Added tint to bottomNavigationView and slidingPanel

This commit is contained in:
Prathamesh More 2021-11-11 20:24:05 +05:30
parent 9d93d700be
commit bc146d8b11
2 changed files with 10 additions and 0 deletions

View file

@ -29,6 +29,7 @@ import androidx.annotation.ColorRes
import androidx.appcompat.widget.AppCompatImageView
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.graphics.ColorUtils
import androidx.core.graphics.drawable.DrawableCompat
import androidx.fragment.app.Fragment
import code.name.monkey.appthemehelper.ThemeStore
@ -223,3 +224,8 @@ fun Drawable.tint(context: Context, @ColorRes color: Int): Drawable =
fun Context.getColorCompat(@ColorRes colorRes: Int): Int {
return ContextCompat.getColor(this, colorRes)
}
@ColorInt
fun Context.darkAccentColor(): Int {
return ColorUtils.blendARGB(accentColor(), surfaceColor(), 0.975f)
}