Android 柱形WaveView

10 篇文章 0 订阅

Android 柱形WaveView

介绍:

一个实现了水波纹动态效果的自定义view,能够改变水的高度,此特性使其可以作为呈现加载效果的progressbar ,可自定义背景色以及进度等

源码项目: https://github.com/john990/WaveView

运行效果:

使用说明:

1
2
3
4
5
6
7
8
9
<com.john.waveview.WaveView
xmlns:wave="http://schemas.android.com/apk/res-auto"
         android:id= "@+id/wave_view"
         android:layout_width= "match_parent"
         android:layout_height= "match_parent"
         android:background= "@color/holo_purple"
         wave:above_wave_color= "@android:color/white"
         wave:blow_wave_color= "@android:color/white"
         wave:progress= "60"
         />

也可以直接使用默认的外观,默认进度为80%

1
2
3
4
5
6
<com.john.waveview.WaveView
         android:id= "@+id/wave_view"
         android:layout_width= "match_parent"
         android:layout_height= "match_parent"
         android:background= "@color/holo_purple"
         />

java:

1
2
3
4
5
6
waveView= (WaveView) findViewById(R.id.wave_view);
waveView.setProgress(int progress);

waveView.setProgress(int progress);



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值