Skip to content

Commit 2964c23

Browse files
authored
Update README.md
1 parent f8c91c2 commit 2964c23

File tree

1 file changed

+74
-1
lines changed

1 file changed

+74
-1
lines changed

README.md

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,75 @@
11
# WaveLineView
2-
a beatiful wave line animation
2+
## 一款内存友好的录音漂亮的波浪动画
3+
4+
# 效果图(实际效果更好)
5+
6+
![image](https://github.com/Jay-Goo/WaveLineView/blob/master/pictures/%E6%95%88%E6%9E%9C.gif)
7+
8+
----------
9+
10+
# Usage
11+
## Step1
12+
```
13+
allprojects {
14+
repositories {
15+
...
16+
maven { url 'https://jitpack.io' }
17+
}
18+
}
19+
20+
dependencies {
21+
compile 'com.github.Jay-Goo:WaveLineView:v1.0.2'
22+
}
23+
```
24+
## Step2
25+
26+
```
27+
<jaygoo.widget.wlv.WaveLineView
28+
android:id="@+id/waveLineView"
29+
android:layout_width="match_parent"
30+
android:layout_height="120dp"
31+
app:wlvBackgroundColor="@android:color/white"
32+
app:wlvMoveSpeed="290"
33+
/>
34+
```
35+
## Step3
36+
37+
```
38+
waveLineView.startAnim();
39+
40+
waveLineView.stopAnim();
41+
```
42+
43+
```
44+
@Override
45+
protected void onResume() {
46+
super.onResume();
47+
waveLineView.onResume();
48+
}
49+
50+
@Override
51+
protected void onPause() {
52+
super.onPause();
53+
waveLineView.onPause();
54+
}
55+
56+
@Override
57+
protected void onDestroy() {
58+
super.onDestroy();
59+
waveLineView.release();
60+
}
61+
```
62+
63+
----------
64+
# Attributes
65+
attr | format | description
66+
-------- | ---|---
67+
backgroundColor|color|背景色
68+
wlvLineColor|color|波浪线的颜色
69+
wlvThickLineWidth|dimension|中间粗波浪曲线的宽度
70+
wlvFineLineWidth|dimension|三条细波浪曲线的宽度
71+
wlvMoveSpeed|float|波浪线移动的速度,默认值为290F,方向从左向右,你可以使用负数改变移动方向
72+
wlvSamplingSize|integer|采样率,动画效果越大越精细,默认64
73+
wlvSensibility|integer|灵敏度,范围[1,10],越大越灵敏,默认值为5
74+
75+
## [原理讲解传送门](https://github.com/Jay-Goo/WaveLineView/blob/master/blog.md)

0 commit comments

Comments
 (0)