GradientButton.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:GradientButton 作者:
private Drawable createBackgroundDrawable(int width, int height) {
    if (isCircular && height > width) {
        width = height;
    } else if (isCircular && width > height) {
        height = width;
    }

    Drawable content = createContentDrawable(width, height);

    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Log.d(TAG, "RIPPLE APPLIED, with color: " + mRippleColor);
        Drawable mask = createMaskDrawable(width, height);
        ColorStateList stateList = ColorStateList.valueOf(mRippleColor);
        return new RippleDrawable(stateList, content, mask);
    } else {
        return content;
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号