Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tougee/audiorecorderview
Simple Audio Recorder View with 'swap-to-cancel' Like Telegram
https://github.com/tougee/audiorecorderview
android audio kotlin recorderview
Last synced: 3 months ago
JSON representation
Simple Audio Recorder View with 'swap-to-cancel' Like Telegram
- Host: GitHub
- URL: https://github.com/tougee/audiorecorderview
- Owner: Tougee
- Created: 2018-05-18T14:08:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T02:49:14.000Z (over 3 years ago)
- Last Synced: 2024-10-11T03:19:53.299Z (4 months ago)
- Topics: android, audio, kotlin, recorderview
- Language: Kotlin
- Homepage:
- Size: 521 KB
- Stars: 57
- Watchers: 2
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# AudioRecorderView
Simple Audio Recorder View with 'swap-to-cancel' Like Telegram
## Usage
```xml// AndroidManifest.xml
// layout include AudioRecordView
```
``` kotlin// activity implemented AudioRecordView.Callback
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)record_view.apply {
activity = this@MainActivity
callback = this@MainActivitymicIcon = R.drawable.ic_chevron_left_gray_24dp
micActiveIcon = R.drawable.ic_play_arrow_black_24dp
micHintEnable = false
micHintText = "Custom hint text"
micHintColor = ContextCompat.getColor(this@MainActivity, android.R.color.holo_red_light)
micHintBg = R.drawable.ic_launcher_background
blinkColor = ContextCompat.getColor(this@MainActivity, R.color.color_blue)
circleColor = ContextCompat.getColor(this@MainActivity, R.color.color_blink)
cancelIconColor = ContextCompat.getColor(this@MainActivity, R.color.color_blue)
slideCancelText = "Custom Slide to cancel"
cancelText = "Custom Cancel"
vibrationEnable = false
}record_view.setTimeoutSeconds(20)
}override fun onRecordStart() {}
override fun isReady() = true
override fun onRecordEnd() {}
override fun onRecordCancel() {}
```
## Setup
### Android Studio / Gradle
Add the following dependency in your root build.gradle at the end of repositories:
```Gradle
allprojects {
repositories {
//...
maven { url = 'https://jitpack.io' }
}
}
```
Add the dependency:
```Gradle
dependencies {
implementation 'com.github.tougee:audiorecorderview:1.0.4'
}
```## License details
```
Copyright 2018 TougeLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```