BlurShape

Project Url: zcxshare/BlurShape
Introduction: Android Blur background drawable ,Ground sand background
More: Author   ReportBugs   
Tags:

介绍

Android 空间毛玻璃、磨砂、高斯模糊背景,带彩色边框,自定义 shape

软件架构

给 view 添加磨砂背景 drawable,自定义的 shape

示例图片

安装教程

1、gradle 集成
    //项目根目录的 build.gradle 中
    allprojects {
        repositories {
            ...
            maven { url 'https://jitpack.io' }
        }
    }

    //app 的 build.gradle 中
    dependencies {
            implementation 'com.github.zcxshare:BlurShape:1.1'
    }
2、自行下载
获取 blur_shape module 的代码依赖即可,比较简单

使用说明

        val shape = BlurShape(clBg, tvContent).apply {//第一个参数是以该 view 为基础进行模糊处理,第二个是需要添加该背景 view
            setStroke(DensityUtil.dp2px(3f).toFloat(),getColor(R.color.bg_treat_colours2))//添加边框线
            setRadius(DensityUtil.dp2px(10f).toFloat())//添加倒角
        }
        tvContent.background = ShapeDrawable(shape)

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools