Merge "Set callback for the color background in the tile" into sc-dev

This commit is contained in:
Fabian Kozynski
2021-04-08 16:24:33 +00:00
committed by Android (Google) Code Review

View File

@@ -118,7 +118,11 @@ open class QSTileViewHorizontal(
override fun setClickable(clickable: Boolean) {
super.setClickable(clickable)
background = if (clickable && mShowRippleEffect) {
mTileBackground
mRipple?.also {
// In case that the colorBackgroundDrawable was used as the background, make sure
// it has the correct callback instead of null
colorBackgroundDrawable?.callback = it
}
} else {
colorBackgroundDrawable
}