转载请标明出处: http://blog.csdn.net/airsaid/article/details/52683193
本文出自:周游的博客
实现效果
使用
XML中:
<com.airsaid.diffuseview.widget.DiffuseView
android:id="@+id/diffuseView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:diffuse_color="@color/colorAccent"
app:diffuse_coreColor="@color/colorPrimaryDark"
app:diffuse_coreImage="@android:drawable/ic_menu_search"
app:diffuse_coreRadius="100"
app:diffuse_maxWidth="300"
app:diffuse_width="4"/>
代码中:
DiffuseView mDiffuseView = (DiffuseView) findViewById(R.id.diffuseView);
mDiffuseView.start(); // 开始扩散
mDiffuseView.stop();// 停止扩散
属性&方法
| 属性名 | java方法 | 作用 |
|---|---|---|
| diffuse_color | setColor(int colorId) | 设置扩散圆颜色 |
| diffuse_coreColor | setCoreColor(int colorId) | 设置中心圆颜色 |
| diffuse_coreImage | setCoreImage(int imageId) | 设置中心圆图片 |
| diffuse_coreRadius | setCoreRadius(int radius) | 设置中心圆半径 |
| diffuse_maxWidth | setMaxWidth(int maxWidth) | 设置最大扩散宽度 |
| diffuse_width | setDiffuseWidth(int width) | 设置扩散圆宽度,值越小越宽 |
代码
/**
* Created by zhouyou on 2016/9/27.

最低0.47元/天 解锁文章
853

被折叠的 条评论
为什么被折叠?



