Skip to content

Commit

Permalink
fix cannot display child view bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankeer committed Feb 22, 2018
1 parent c2c7d0a commit 30c52ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shadow/src/main/java/com/loopeer/shadow/ShadowView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,8 @@ open class ShadowView @JvmOverloads constructor(context: Context?, attributeSet:
, cornerRadiusBR
, cornerRadiusBL)
it.drawPath(path, bgPaint)
canvas.clipPath(path)
canvas.drawColor(backgroundClr) // draw backgroundColor
}
}

Expand All @@ -308,7 +310,6 @@ open class ShadowView @JvmOverloads constructor(context: Context?, attributeSet:
, cornerRadiusBR
, cornerRadiusBL)
canvas.clipPath(path)
canvas.drawColor(backgroundClr) // draw backgroundColor
drawForeground(canvas)
canvas.restore()
}
Expand Down

0 comments on commit 30c52ad

Please sign in to comment.