Enable dither for DismissView

It otherwise causes banding on devices with a small color palette.

Bug: 274938944
Test: Look for banding with maximum brightness and dark background
Test: Before https://screenshot.googleplex.com/8kHhVcps35MKqDj.png
Test: After https://screenshot.googleplex.com/Az5c9ykirCQpMXi.png
Change-Id: I62a10a8e9c7f2e8293b93f44d9f4d2fedfbc428a
This commit is contained in:
Hongwei Wang
2023-05-04 17:13:42 -07:00
parent 7fa9ecf247
commit 17dd6ccc75

View File

@@ -144,6 +144,7 @@ class DismissView(context: Context) : FrameLayout(context) {
val gd = GradientDrawable(
GradientDrawable.Orientation.BOTTOM_TOP,
intArrayOf(gradientColorWithAlpha, Color.TRANSPARENT))
gd.setDither(true)
gd.setAlpha(0)
return gd
}