diff --git a/README.md b/README.md index 1ea5f17..8ca1062 100644 --- a/README.md +++ b/README.md @@ -51,14 +51,14 @@ repositories { } dependencies { - compile 'com.github.adrielcafe:AndroidAudioRecorder:0.0.3' + compile 'com.github.adrielcafe:AndroidAudioRecorder:0.0.4' } ``` ## TODO - [ ] Pause audio - [ ] Play recorded audio -- [ ] Tint images to black when background color is too bright +- [X] Tint images to black when background color is too bright ## Dependencies * [OmRecorder](https://github.com/kailash09dabhi/OmRecorder) diff --git a/app/build.gradle b/app/build.gradle index 9b926f8..addea06 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,7 +21,7 @@ android { dependencies { compile 'com.android.support:appcompat-v7:24.1.1' compile project(':lib') -// compile 'com.github.adrielcafe:AndroidAudioRecorder:0.0.3' +// compile 'com.github.adrielcafe:AndroidAudioRecorder:0.0.4' } repositories { diff --git a/lib/src/main/java/cafe/adriel/androidaudiorecorder/AudioRecorderActivity.java b/lib/src/main/java/cafe/adriel/androidaudiorecorder/AudioRecorderActivity.java index 8aee3c1..8932ea4 100644 --- a/lib/src/main/java/cafe/adriel/androidaudiorecorder/AudioRecorderActivity.java +++ b/lib/src/main/java/cafe/adriel/androidaudiorecorder/AudioRecorderActivity.java @@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; +import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -88,13 +89,6 @@ protected void onDestroy() { super.onDestroy(); } - @Override - public void onBackPressed() { - setResult(RESULT_CANCELED); - stopRecoding(); - super.onBackPressed(); - } - @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.audio_recorder, menu); @@ -154,7 +148,9 @@ public void run() { private void stopRecoding() { isRecording = false; - selectMenuItem.setVisible(true); + if(!isFinishing()) { + selectMenuItem.setVisible(true); + } recordView.setImageResource(R.drawable.ic_play); if (recorder != null) {