├── .gitignore
├── .idea
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.html
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── java
│ └── com
│ │ └── github
│ │ └── onlynight
│ │ └── waveview
│ │ └── demo
│ │ └── MainActivity.java
│ └── res
│ ├── layout
│ └── activity_main.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ └── values
│ ├── colors.xml
│ ├── strings.xml
│ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── images
└── waveview.gif
├── settings.gradle
└── waveviewlibrary
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
├── androidTest
└── java
│ └── com
│ └── github
│ └── onlynight
│ └── waveview
│ └── ExampleInstrumentedTest.java
├── main
├── AndroidManifest.xml
├── java
│ └── com
│ │ └── github
│ │ └── onlynight
│ │ └── waveview
│ │ └── WaveView.java
└── res
│ └── values
│ ├── attrs.xml
│ └── strings.xml
└── test
└── java
└── com
└── github
└── onlynight
└── waveview
└── ExampleUnitTest.java
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
19 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.html:
--------------------------------------------------------------------------------
1 |
WaveView
1018 | First View
1019 | 
1020 | Add to your project
1021 | Step 1. Add the JitPack repository to your build file
1022 | Add it in your root build.gradle at the end of repositories:
1023 | allprojects {
1024 | repositories {
1025 | ...
1026 | maven { url 'https://jitpack.io' }
1027 | }
1028 | }
1029 |
1030 |
1031 | Step 2. Add the dependency
1032 | dependencies {
1033 | compile 'com.github.onlynight:WaveView:1.0.0'
1034 | }
1035 |
1036 |
1037 | How to use
1038 | in your xml file:
1039 | <com.github.onlynight.waveview.WaveView
1040 | android:id="@+id/waveView1"
1041 | android:layout_width="0dp"
1042 | android:layout_height="match_parent"
1043 | android:layout_weight="1"
1044 | app:isCircle="false"
1045 | app:period="4"
1046 | app:waveHeightPercent="0.5"
1047 | app:waveRange="15dp"
1048 | app:waveSpeed="10"
1049 | app:waveStrokeWidth="3dp"/>
1050 |
1051 |
1052 | in your java code file:
1053 | mWaveView1 = (WaveView) findViewById(R.id.waveView1);
1054 | mWaveView1.start();
1055 |
1056 |
1057 | property explain
1058 |
1059 | <declare-styleable name="WaveView">
1060 |
1061 | <!-- define wave speed, example value 10 -->
1062 | <attr name="waveSpeed" format="float"/>
1063 |
1064 | <!-- define wave range, example value 15dp -->
1065 | <attr name="waveRange" format="dimension|reference"/>
1066 |
1067 | <!-- define wave 1 color -->
1068 | <attr name="wave1Color" format="color|reference"/>
1069 |
1070 | <!-- define wave 2 color -->
1071 | <attr name="wave2Color" format="color|reference"/>
1072 |
1073 | <!-- define wave height percent, the value is between 0 to 1 -->
1074 | <attr name="waveHeightPercent" format="float"/>
1075 |
1076 | <!-- define paint stroke width, if you want optimizing view,
1077 | you should change the stroke width more-->
1078 | <attr name="waveStrokeWidth" format="dimension|reference"/>
1079 |
1080 | <!-- if the view is circle -->
1081 | <attr name="isCircle" format="boolean"/>
1082 |
1083 | <!-- the sine wave period, value range 0 to all -->
1084 | <attr name="period" format="float"/>
1085 |
1086 | </declare-styleable>
1087 |
1088 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | WaveView
2 | ========
3 |
4 | ## First View
5 |
6 | 
7 |
8 |
9 | ## Add to your project
10 |
11 | #### Step 1. Add the JitPack repository to your build file
12 | Add it in your root build.gradle at the end of repositories:
13 |
14 | ```
15 | allprojects {
16 | repositories {
17 | ...
18 | maven { url 'https://jitpack.io' }
19 | }
20 | }
21 | ```
22 |
23 | #### Step 2. Add the dependency
24 |
25 | ```
26 | dependencies {
27 | compile 'com.github.onlynight:WaveView:1.0.0'
28 | }
29 | ```
30 |
31 | ## How to use
32 |
33 | in your xml file:
34 |
35 | ```xml
36 |