Support ltr and rtl flow of the recording waveform.

This commit is contained in:
Onuray Sahin 2022-03-04 17:16:09 +03:00
parent aae75ce52f
commit 601f10a6fb
1 changed files with 3 additions and 2 deletions

View File

@ -164,9 +164,10 @@ class AudioWaveformView @JvmOverloads constructor(
private fun drawBars(canvas: Canvas) {
var currentX = horizontalPadding
visibleBarHeights.forEach {
val flowableBarHeights = if (flow == Flow.LTR) visibleBarHeights else visibleBarHeights.reversed()
flowableBarHeights.forEach {
barPaint.color = it.color
// TODO. Support flow
when (alignment) {
Alignment.BOTTOM -> {
val startY = height - verticalPadding