mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-16 19:18:52 +01:00
Fixed crash when trying to tint null background on Lollipop
This commit is contained in:
@@ -41,7 +41,7 @@ fun View.setBackgroundTint(color: Int) {
|
||||
|
||||
// API 21 doesn't support this
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1) {
|
||||
background.setColorFilter(color, PorterDuff.Mode.SRC_ATOP)
|
||||
background?.setColorFilter(color, PorterDuff.Mode.SRC_ATOP)
|
||||
}
|
||||
|
||||
backgroundTintList = ColorStateList.valueOf(color)
|
||||
|
||||
Reference in New Issue
Block a user