Support ltr and rtl flow of the recording waveform.
This commit is contained in:
parent
aae75ce52f
commit
601f10a6fb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue