├── .gitignore
├── .idea
├── .name
├── compiler.xml
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── gradle.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
└── vcs.xml
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── carlos
│ │ └── voiceline
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── carlos
│ │ │ └── voiceline
│ │ │ └── MainActivity.java
│ └── res
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── content_main.xml
│ │ ├── menu
│ │ └── menu_main.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values-w820dp
│ │ └── dimens.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── carlos
│ └── voiceline
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── line.gif
├── mylibrary
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── carlos
│ │ └── voiceline
│ │ └── mylibrary
│ │ └── ApplicationTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── carlos
│ │ │ └── voiceline
│ │ │ └── mylibrary
│ │ │ ├── Arith.java
│ │ │ └── VoiceLineView.java
│ └── res
│ │ └── values
│ │ ├── attrs.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── carlos
│ └── voiceline
│ └── mylibrary
│ └── ExampleUnitTest.java
├── rect.gif
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | VoiceLine
--------------------------------------------------------------------------------
/.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 |
26 |
27 |
--------------------------------------------------------------------------------
/.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 |
--------------------------------------------------------------------------------
/.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.md:
--------------------------------------------------------------------------------
1 |
2 | ####VoiceLine,一个可以根据麦克风音量大小,显示一些波形效果的控件。一共有两种效果,波开和矩形,如下。也有一些自定义属性,包括波形的颜色,灵敏度,间隔等。
3 |
4 | 
5 | 
6 |
7 | 引用方法:
8 |
9 | ```groovy
10 | compile 'com.carlos.voiceline:mylibrary:1.0.6'
11 | ```
12 | ####自定义属性列表如下:
13 | ```xml
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 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | ```
56 | 实际使用过程中,可以这样配置:
57 |
58 | ```xml
59 |
73 | ```
74 |
75 | ### License
76 |
77 | Copyright 2016 carlos
78 |
79 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
80 | You may obtain a copy of the License at
81 |
82 | http://www.apache.org/licenses/LICENSE-2.0
83 |
84 | Unless required by applicable law or agreed to in writing, software
85 | distributed under the License is distributed on an "AS IS" BASIS,
86 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
87 | See the License for the specific language governing permissions and
88 | limitations under the License.
89 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 23
5 | buildToolsVersion "23.0.2"
6 |
7 | defaultConfig {
8 | applicationId "com.carlos.voiceline"
9 | minSdkVersion 15
10 | targetSdkVersion 22
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:23.1.1'
26 | compile 'com.android.support:design:23.1.1'
27 | compile project(':mylibrary')
28 | }
29 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in f:\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/carlos/voiceline/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/java/com/carlos/voiceline/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline;
2 |
3 | import android.media.MediaRecorder;
4 | import android.os.Bundle;
5 | import android.os.Environment;
6 | import android.os.Handler;
7 | import android.os.Message;
8 | import android.support.v7.app.AppCompatActivity;
9 |
10 | import com.carlos.voiceline.mylibrary.VoiceLineView;
11 |
12 | import java.io.File;
13 | import java.io.IOException;
14 |
15 | public class MainActivity extends AppCompatActivity implements Runnable {
16 | private MediaRecorder mMediaRecorder;
17 | private boolean isAlive = true;
18 | private VoiceLineView voiceLineView;
19 | private Handler handler = new Handler() {
20 | @Override
21 | public void handleMessage(Message msg) {
22 | super.handleMessage(msg);
23 | if(mMediaRecorder==null) return;
24 | double ratio = (double) mMediaRecorder.getMaxAmplitude() / 100;
25 | double db = 0;// 分贝
26 | //默认的最大音量是100,可以修改,但其实默认的,在测试过程中就有不错的表现
27 | //你可以传自定义的数字进去,但需要在一定的范围内,比如0-200,就需要在xml文件中配置maxVolume
28 | //同时,也可以配置灵敏度sensibility
29 | if (ratio > 1)
30 | db = 20 * Math.log10(ratio);
31 | //只要有一个线程,不断调用这个方法,就可以使波形变化
32 | //主要,这个方法必须在ui线程中调用
33 | voiceLineView.setVolume((int) (db));
34 | }
35 | };
36 |
37 | @Override
38 | protected void onCreate(Bundle savedInstanceState) {
39 | super.onCreate(savedInstanceState);
40 | setContentView(R.layout.activity_main);
41 | voiceLineView = (VoiceLineView) findViewById(R.id.voicLine);
42 | if (mMediaRecorder == null)
43 | mMediaRecorder = new MediaRecorder();
44 |
45 | mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
46 | mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
47 | mMediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
48 | File file = new File(Environment.getExternalStorageDirectory().getPath(), "hello.log");
49 | if (!file.exists()) {
50 | try {
51 | file.createNewFile();
52 | } catch (IOException e) {
53 | e.printStackTrace();
54 | }
55 | }
56 | mMediaRecorder.setOutputFile(file.getAbsolutePath());
57 | mMediaRecorder.setMaxDuration(1000 * 60 * 10);
58 | try {
59 | mMediaRecorder.prepare();
60 | } catch (IOException e) {
61 | e.printStackTrace();
62 | }
63 | mMediaRecorder.start();
64 |
65 | Thread thread = new Thread(this);
66 | thread.start();
67 | }
68 |
69 | @Override
70 | protected void onDestroy() {
71 | isAlive = false;
72 | mMediaRecorder.release();
73 | mMediaRecorder = null;
74 | super.onDestroy();
75 | }
76 |
77 | @Override
78 | public void run() {
79 | while (isAlive) {
80 | handler.sendEmptyMessage(0);
81 | try {
82 | Thread.sleep(100);
83 | } catch (InterruptedException e) {
84 | e.printStackTrace();
85 | }
86 | }
87 | }
88 | }
89 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/content_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
19 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 | >
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 | 16dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | VoiceLine
3 | Settings
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/test/java/com/carlos/voiceline/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.1.2'
9 | classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
10 | classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
11 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | jcenter()
20 | }
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 13 10:11:23 CST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/line.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/line.gif
--------------------------------------------------------------------------------
/mylibrary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/mylibrary/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | version = "1.0.6" //项目版本号
4 | android {
5 | compileSdkVersion 23
6 | buildToolsVersion "23.0.2"
7 |
8 | defaultConfig {
9 | minSdkVersion 15
10 | targetSdkVersion 23
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | }
26 |
27 | ext {
28 | bintrayRepo = 'maven'
29 | bintrayName = 'voiceLine' //项目名字
30 |
31 | publishedGroupId = 'com.carlos.voiceline' //GroupId,这个要别人引用的时候会用到,
32 | libraryName = 'voiceLineLibrary' //这个是项目名字
33 | artifact = 'mylibrary' //artifactId,这个也是别人引用的时候,会用到
34 |
35 | libraryDescription = '一个可以根据音量显示波形的控件' //项目描述
36 |
37 | siteUrl = 'https://github.com/ws123/VoiceLine' //把项目分享到github后的项目地址
38 | gitUrl = 'https://github.com/ws123/VoiceLine.git' //分享后的项目git地址
39 |
40 | libraryVersion = '1.0.6'
41 |
42 | developerId = 'carlos' //这个开发者id,自己写
43 | developerName = 'carlos' //这个是开发者名字
44 | developerEmail = '372532647@qq.com' //开发者邮箱
45 |
46 | licenseName = 'The Apache Software License, Version 2.0' //开源协议
47 | licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
48 | allLicenses = ["Apache-2.0"]
49 | }
50 | apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
51 | apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
52 |
53 | task androidJavadocs(type: Javadoc) {
54 | source = android.sourceSets.main.java.srcDirs
55 | classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
56 | allprojects {
57 | tasks.withType(Javadoc) {
58 | options.encoding = "UTF-8"
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/mylibrary/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in f:\Android\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/mylibrary/src/androidTest/java/com/carlos/voiceline/mylibrary/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline.mylibrary;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/mylibrary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/mylibrary/src/main/java/com/carlos/voiceline/mylibrary/Arith.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline.mylibrary;
2 |
3 | import java.math.BigDecimal;
4 |
5 | /**
6 | * Created by carlos on 2016/4/5.
7 | */
8 | public class Arith{
9 |
10 | //默认除法运算精度
11 | private static final int DEF_DIV_SCALE = 10;
12 | //这个类不能实例化
13 | private Arith(){
14 | }
15 |
16 | /**
17 | * 提供精确的加法运算。
18 | * @param v1 被加数
19 | * @param v2 加数
20 | * @return 两个参数的和
21 | */
22 | public static double add(double v1,double v2){
23 | BigDecimal b1 = new BigDecimal(Double.toString(v1));
24 | BigDecimal b2 = new BigDecimal(Double.toString(v2));
25 | return b1.add(b2).doubleValue();
26 | }
27 | /**
28 | * 提供精确的减法运算。
29 | * @param v1 被减数
30 | * @param v2 减数
31 | * @return 两个参数的差
32 | */
33 | public static double sub(double v1,double v2){
34 | BigDecimal b1 = new BigDecimal(Double.toString(v1));
35 | BigDecimal b2 = new BigDecimal(Double.toString(v2));
36 | return b1.subtract(b2).doubleValue();
37 | }
38 | /**
39 | * 提供精确的乘法运算。
40 | * @param v1 被乘数
41 | * @param v2 乘数
42 | * @return 两个参数的积
43 | */
44 | public static double mul(double v1,double v2){
45 | BigDecimal b1 = new BigDecimal(Double.toString(v1));
46 | BigDecimal b2 = new BigDecimal(Double.toString(v2));
47 | return b1.multiply(b2).doubleValue();
48 | }
49 |
50 | /**
51 | * 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到
52 | * 小数点以后10位,以后的数字四舍五入。
53 | * @param v1 被除数
54 | * @param v2 除数
55 | * @return 两个参数的商
56 | */
57 | public static double div(double v1,double v2){
58 | return div(v1,v2,DEF_DIV_SCALE);
59 | }
60 |
61 | /**
62 | * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指
63 | * 定精度,以后的数字四舍五入。
64 | * @param v1 被除数
65 | * @param v2 除数
66 | * @param scale 表示表示需要精确到小数点以后几位。
67 | * @return 两个参数的商
68 | */
69 | public static double div(double v1,double v2,int scale){
70 | if(scale<0){
71 | throw new IllegalArgumentException(
72 | "The scale must be a positive integer or zero");
73 | }
74 | BigDecimal b1 = new BigDecimal(Double.toString(v1));
75 | BigDecimal b2 = new BigDecimal(Double.toString(v2));
76 | return b1.divide(b2,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
77 | }
78 |
79 | /**
80 | * 提供精确的小数位四舍五入处理。
81 | * @param v 需要四舍五入的数字
82 | * @param scale 小数点后保留几位
83 | * @return 四舍五入后的结果
84 | */
85 | public static double round(double v,int scale){
86 |
87 | if(scale<0){
88 | throw new IllegalArgumentException(
89 | "The scale must be a positive integer or zero");
90 | }
91 | BigDecimal b = new BigDecimal(Double.toString(v));
92 | BigDecimal one = new BigDecimal("1");
93 | return b.divide(one,scale,BigDecimal.ROUND_HALF_UP).doubleValue();
94 | }
95 | };
96 |
--------------------------------------------------------------------------------
/mylibrary/src/main/java/com/carlos/voiceline/mylibrary/VoiceLineView.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline.mylibrary;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.graphics.Canvas;
6 | import android.graphics.Color;
7 | import android.graphics.Paint;
8 | import android.graphics.Path;
9 | import android.graphics.Rect;
10 | import android.util.AttributeSet;
11 | import android.view.View;
12 |
13 | import java.util.ArrayList;
14 | import java.util.LinkedList;
15 | import java.util.List;
16 |
17 | /**
18 | * Created by carlos on 2016/1/29.
19 | * 自定义声音振动曲线view
20 | */
21 | public class VoiceLineView extends View {
22 | private final int LINE = 0;
23 | private final int RECT = 1;
24 |
25 | private int middleLineColor = Color.BLACK;
26 | private int voiceLineColor = Color.BLACK;
27 | private float middleLineHeight = 4;
28 | private Paint paint;
29 | private Paint paintVoicLine;
30 | private int mode;
31 | /**
32 | * 灵敏度
33 | */
34 | private int sensibility = 4;
35 |
36 | private float maxVolume = 100;
37 |
38 |
39 | private float translateX = 0;
40 | private boolean isSet = false;
41 |
42 | /**
43 | * 振幅
44 | */
45 | private float amplitude = 1;
46 | /**
47 | * 音量
48 | */
49 | private float volume = 10;
50 | private int fineness = 1;
51 | private float targetVolume = 1;
52 |
53 |
54 | private long speedY = 50;
55 | private float rectWidth = 25;
56 | private float rectSpace = 5;
57 | private float rectInitHeight = 4;
58 | private List rectList;
59 |
60 | private long lastTime = 0;
61 | private int lineSpeed = 90;
62 |
63 | List paths = null;
64 |
65 | public VoiceLineView(Context context) {
66 | super(context);
67 | }
68 |
69 | public VoiceLineView(Context context, AttributeSet attrs) {
70 | super(context, attrs);
71 | initAtts(context, attrs);
72 | }
73 |
74 | public VoiceLineView(Context context, AttributeSet attrs, int defStyleAttr) {
75 | super(context, attrs, defStyleAttr);
76 | initAtts(context, attrs);
77 | }
78 |
79 | private void initAtts(Context context, AttributeSet attrs) {
80 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.voiceView);
81 | mode = typedArray.getInt(R.styleable.voiceView_viewMode, 0);
82 | voiceLineColor = typedArray.getColor(R.styleable.voiceView_voiceLine, Color.BLACK);
83 | maxVolume = typedArray.getFloat(R.styleable.voiceView_maxVolume, 100);
84 | sensibility = typedArray.getInt(R.styleable.voiceView_sensibility, 4);
85 | if (mode == RECT) {
86 | rectWidth = typedArray.getDimension(R.styleable.voiceView_rectWidth, 25);
87 | rectSpace = typedArray.getDimension(R.styleable.voiceView_rectSpace, 5);
88 | rectInitHeight = typedArray.getDimension(R.styleable.voiceView_rectInitHeight, 4);
89 | } else {
90 | middleLineColor = typedArray.getColor(R.styleable.voiceView_middleLine, Color.BLACK);
91 | middleLineHeight = typedArray.getDimension(R.styleable.voiceView_middleLineHeight, 4);
92 | lineSpeed = typedArray.getInt(R.styleable.voiceView_lineSpeed, 90);
93 | fineness = typedArray.getInt(R.styleable.voiceView_fineness, 1);
94 | paths = new ArrayList<>(20);
95 | for (int i = 0; i < 20; i++) {
96 | paths.add(new Path());
97 | }
98 | }
99 | typedArray.recycle();
100 | }
101 |
102 | @Override
103 | protected void onDraw(Canvas canvas) {
104 | if (mode == RECT) {
105 | drawVoiceRect(canvas);
106 | } else {
107 | drawMiddleLine(canvas);
108 | drawVoiceLine(canvas);
109 | }
110 | run();
111 | }
112 |
113 | private void drawMiddleLine(Canvas canvas) {
114 | if (paint == null) {
115 | paint = new Paint();
116 | paint.setColor(middleLineColor);
117 | paint.setAntiAlias(true);
118 | }
119 | canvas.save();
120 | canvas.drawRect(0, getHeight() / 2 - middleLineHeight / 2, getWidth(), getHeight() / 2 + middleLineHeight / 2, paint);
121 | canvas.restore();
122 | }
123 |
124 | private void drawVoiceLine(Canvas canvas) {
125 | lineChange();
126 | if (paintVoicLine == null) {
127 | paintVoicLine = new Paint();
128 | paintVoicLine.setColor(voiceLineColor);
129 | paintVoicLine.setAntiAlias(true);
130 | paintVoicLine.setStyle(Paint.Style.STROKE);
131 | paintVoicLine.setStrokeWidth(2);
132 | }
133 | canvas.save();
134 | int moveY = getHeight() / 2;
135 | for (int i = 0; i < paths.size(); i++) {
136 | paths.get(i).reset();
137 | paths.get(i).moveTo(getWidth(), getHeight() / 2);
138 | }
139 | for (float i = getWidth() - 1; i >= 0; i -= fineness) {
140 | amplitude = 4 * volume * i / getWidth() - 4 * volume * i * i / getWidth() / getWidth();
141 | for (int n = 1; n <= paths.size(); n++) {
142 | float sin = amplitude * (float) Math.sin((i - Math.pow(1.22, n)) * Math.PI / 180 - translateX);
143 | paths.get(n - 1).lineTo(i, (2 * n * sin / paths.size() - 15 * sin / paths.size() + moveY));
144 | }
145 | }
146 | for (int n = 0; n < paths.size(); n++) {
147 | if (n == paths.size() - 1) {
148 | paintVoicLine.setAlpha(255);
149 | } else {
150 | paintVoicLine.setAlpha(n * 130 / paths.size());
151 | }
152 | if (paintVoicLine.getAlpha() > 0) {
153 | canvas.drawPath(paths.get(n), paintVoicLine);
154 | }
155 | }
156 | canvas.restore();
157 | }
158 |
159 | private void drawVoiceRect(Canvas canvas) {
160 | if (paintVoicLine == null) {
161 | paintVoicLine = new Paint();
162 | paintVoicLine.setColor(voiceLineColor);
163 | paintVoicLine.setAntiAlias(true);
164 | paintVoicLine.setStyle(Paint.Style.STROKE);
165 | paintVoicLine.setStrokeWidth(2);
166 | }
167 | if (rectList == null) {
168 | rectList = new LinkedList<>();
169 | }
170 | int totalWidth = (int) (rectSpace + rectWidth);
171 | if (speedY % totalWidth < 6) {
172 | Rect rect = new Rect((int) (-rectWidth - 10 - speedY + speedY % totalWidth),
173 | (int) (getHeight() / 2 - rectInitHeight / 2 - (volume == 10 ? 0 : volume / 2)),
174 | (int) (-10 - speedY + speedY % totalWidth),
175 | (int) (getHeight() / 2 + rectInitHeight / 2 + (volume == 10 ? 0 : volume / 2)));
176 | if (rectList.size() > getWidth() / (rectSpace + rectWidth) + 2) {
177 | rectList.remove(0);
178 | }
179 | rectList.add(rect);
180 | }
181 | canvas.translate(speedY, 0);
182 | for (int i = rectList.size() - 1; i >= 0; i--) {
183 | canvas.drawRect(rectList.get(i), paintVoicLine);
184 | }
185 | rectChange();
186 | }
187 |
188 | public void setVolume(int volume) {
189 | if (volume > maxVolume * sensibility / 25) {
190 | isSet = true;
191 | this.targetVolume = getHeight() * volume / 2 / maxVolume;
192 | }
193 | }
194 |
195 | private void lineChange() {
196 | if (lastTime == 0) {
197 | lastTime = System.currentTimeMillis();
198 | translateX += 1.5;
199 | } else {
200 | if (System.currentTimeMillis() - lastTime > lineSpeed) {
201 | lastTime = System.currentTimeMillis();
202 | translateX += 1.5;
203 | } else {
204 | return;
205 | }
206 | }
207 | if (volume < targetVolume && isSet) {
208 | volume += getHeight() / 30;
209 | } else {
210 | isSet = false;
211 | if (volume <= 10) {
212 | volume = 10;
213 | } else {
214 | if (volume < getHeight() / 30) {
215 | volume -= getHeight() / 60;
216 | } else {
217 | volume -= getHeight() / 30;
218 | }
219 | }
220 | }
221 | }
222 |
223 | private void rectChange() {
224 | speedY += 6;
225 | if (volume < targetVolume && isSet) {
226 | volume += getHeight() / 30;
227 | } else {
228 | isSet = false;
229 | if (volume <= 10) {
230 | volume = 10;
231 | } else {
232 | if (volume < getHeight() / 30) {
233 | volume -= getHeight() / 60;
234 | } else {
235 | volume -= getHeight() / 30;
236 | }
237 | }
238 | }
239 | }
240 |
241 | public void run() {
242 | if (mode == RECT) {
243 | postInvalidateDelayed(30);
244 | } else {
245 | invalidate();
246 | }
247 | }
248 |
249 | }
--------------------------------------------------------------------------------
/mylibrary/src/main/res/values/attrs.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 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/mylibrary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | My Library
3 |
4 |
--------------------------------------------------------------------------------
/mylibrary/src/test/java/com/carlos/voiceline/mylibrary/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.carlos.voiceline.mylibrary;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * To work on unit tests, switch the Test Artifact in the Build Variants view.
9 | */
10 | public class ExampleUnitTest {
11 | @Test
12 | public void addition_isCorrect() throws Exception {
13 | assertEquals(4, 2 + 2);
14 | }
15 | }
--------------------------------------------------------------------------------
/rect.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ws123/VoiceLine/0e78297f4b8f51f95557c61f303d81a9cdac4635/rect.gif
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':mylibrary'
2 |
--------------------------------------------------------------------------------