# AudioRecorderView
**Repository Path**: ifind_luopan_admin/AudioRecorderView
## Basic Information
- **Project Name**: AudioRecorderView
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-12-13
- **Last Updated**: 2024-11-22
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## 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@MainActivity
micIcon = 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.3'
}
```
## License details
```
Copyright 2018 Touge
Licensed 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 at
http://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.
```