# Audio Track View
## Import
```gradle
dependencies {
implementation project(':audiotrack')
}
```
## Loop Audio Track View
```xml
```
```kotlin
class AudioTrackActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_audio_track)
loopAudioTrackView.onSelectListener =
object :LoopAudioTrackView.OnSelectListener{
override fun onSelect() {
}
}
loopAudioTrackView.onScrollListener =
object : AudioTrackView.OnScrollListener {
override fun onScroll(scrollRatio: Double) {
Log.d("Debug", "scroll track $scrollRatio")
}
}
loopAudioTrackView.onLoopScrollListener =
object : LoopAudioTrackView.OnLoopScrollListener {
override fun onScroll(scrollRatio: Double) {
Log.d("Debug", "scroll track $scrollRatio")
}
}
}
}
```
## Edit Audio Track View
```xml
```
```kotlin
class AudioTrackActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_audio_track)
editAudioTrackView.onHeadScrollListener =
object :EditAudioTrackView.OnEditScrollListener{
override fun onScroll(view: EditAudioTrackView, scrollRatio: Double) {
}
}
editAudioTrackView.onEndScrollListener =
object :EditAudioTrackView.OnEditScrollListener{
override fun onScroll(view: EditAudioTrackView, scrollRatio: Double) {
}
}
}
}
```