@Override
protected void onBoundsChange(Rect bounds) {
if(mBackgroundDrawable != null)
mBackgroundDrawable.setBounds(bounds);
mBackgroundBounds.set(bounds.left + mMask.left, bounds.top + mMask.top, bounds.right - mMask.right, bounds.bottom - mMask.bottom);
mBackground.reset();
switch (mMask.type) {
case Mask.TYPE_OVAL:
mBackground.addOval(mBackgroundBounds, Direction.CW);
break;
case Mask.TYPE_RECTANGLE:
mBackground.addRoundRect(mBackgroundBounds, mMask.cornerRadius, Direction.CW);
break;
}
}
RippleDrawable.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:material-master
作者:
评论列表
文章目录