Skip to content

Commit f1b99a0

Browse files
committed
New Updates
1 parent f235a48 commit f1b99a0

File tree

4 files changed

+26
-43
lines changed

4 files changed

+26
-43
lines changed

toolsLibrary/src/androidTest/java/com/bvtech/toolslibrary/ExampleInstrumentedTest.java

Lines changed: 0 additions & 26 deletions
This file was deleted.

toolsLibrary/src/main/java/com/bvtech/toolslibrary/Utility/FileUtil.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import android.util.Log;
77

88
import java.io.File;
9+
import java.io.FileInputStream;
910
import java.io.FileOutputStream;
1011
import java.io.IOException;
1112
import java.io.InputStream;
@@ -235,6 +236,25 @@ public static String getFileName(String p) {
235236
return null;
236237
}
237238

239+
public static void copy(File src, File dst) throws IOException {
240+
InputStream in = new FileInputStream(src);
241+
try {
242+
OutputStream out = new FileOutputStream(dst);
243+
try {
244+
// Transfer bytes from in to out
245+
byte[] buf = new byte[1024];
246+
int len;
247+
while ((len = in.read(buf)) > 0) {
248+
out.write(buf, 0, len);
249+
}
250+
} finally {
251+
out.close();
252+
}
253+
} finally {
254+
in.close();
255+
}
256+
}
257+
238258
public static boolean copyFileFromAssetManagerToApplicationDirectory(Context context, String argAssetDir, String argDestinationDir) {
239259
boolean ret = true;
240260
try {

toolsLibrary/src/main/java/com/bvtech/toolslibrary/widget/waveview/WaveView.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ public WaveView(Context context, AttributeSet attrs) {
6767
setProgress(mProgress);
6868
}
6969

70+
public void setWaveColor(int color){
71+
mWave.setAboveWaveColor(color);
72+
mWave.setBlowWaveColor(color);
73+
mWave.initializePainters();
74+
}
75+
7076
public void setProgress(int progress) {
7177
this.mProgress = progress > mProgressMax ? (int) mProgressMax : progress;
7278
computeWaveToTop();

toolsLibrary/src/test/java/com/bvtech/toolslibrary/ExampleUnitTest.java

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)