Skip to content

This is a circle on the proliferation of Android custom view.

Notifications You must be signed in to change notification settings

pingxu/DiffuseView

Repository files navigation

DiffuseView

This is a circle on the proliferation of Android custom view.(这是Android平台上一个自定义的圆形扩散View。)

实现效果

使用

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_speed="5" app:diffuse_width="4"/> 

代码中:

DiffuseView mDiffuseView = (DiffuseView) findViewById(R.id.diffuseView); mDiffuseView.start(); // 开始扩散 mDiffuseView.stop();// 停止扩散 

属性&方法

属性名java方法作用
diffuse_colorsetColor(int colorId)设置扩散圆颜色
diffuse_coreColorsetCoreColor(int colorId)设置中心圆颜色
diffuse_coreImagesetCoreImage(int imageId)设置中心圆图片
diffuse_coreRadiussetCoreRadius(int radius)设置中心圆半径
diffuse_maxWidthsetMaxWidth(int maxWidth)设置最大扩散宽度
diffuse_widthsetDiffuseWidth(int width)设置扩散圆宽度,值越小越宽
diffuse_speedsetDiffuseSpeed(int speed)设置扩散速度

联系我

我的博客

感谢

http://www.kancloud.cn/digest/liuguilin/120373

About

This is a circle on the proliferation of Android custom view.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java100.0%