A Android Custom View With The Water Wave Effect.
Step 1. Import it to your project as a module;[将该控件作为module导入你的项目中]
Step 2. Add the dependency in your project build gradle.[在你的build.gradle中,添加以下依赖]
dependencies {
compile project(':WaterWaveView')
}
In the Xml file,like this:[在布局文件中,如下]
<luxun.waterwaveview.CircleWaterWaveView
android:id="@+id/waveview"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />
You can also add the following attribute for it:
app:textColor="#00ff00"
app:waterColor="#00ff00"
app:strokeColor="#00ff00"
app:backgroudColor="#00ff00"
app:amplitude="1.0"[水波振幅]
app:max="1000"
app:progress="500"
app:increase="6.0"[水波涨幅]
app:upSpeed="3"[上涨速度]
app:waterSpeed="8"[移动速度]
app:strokeSize="4dp"
app:textSize="20dp"
##About Author
安卓菜鸟一枚,欢迎访问我的博客:我的博客
If you like this,star and fork,thank you!