Made volumeHistory public

This commit is contained in:
Fabian Wiesel
2024-03-01 18:03:33 +01:00
parent eba51360c1
commit 282753854f
2 changed files with 2 additions and 6 deletions

View File

@@ -47,7 +47,7 @@ class ListenActivity : Activity() {
val connectedText = findViewById<TextView>(R.id.connectedTo) val connectedText = findViewById<TextView>(R.id.connectedTo)
connectedText.text = bs.childDeviceName connectedText.text = bs.childDeviceName
val volumeView = findViewById<VolumeView>(R.id.volume) val volumeView = findViewById<VolumeView>(R.id.volume)
volumeView.setVolumeHistory(bs.volumeHistory) volumeView.volumeHistory = bs.volumeHistory
bs.setUpdateCallback { volumeView.postInvalidate() } bs.setUpdateCallback { volumeView.postInvalidate() }
bs.setErrorCallback { postErrorMessage() } bs.setErrorCallback { postErrorMessage() }
} }

View File

@@ -26,7 +26,7 @@ import kotlin.math.min
class VolumeView : View { class VolumeView : View {
private val paint: Paint private val paint: Paint
private var volumeHistory: VolumeHistory? = null public var volumeHistory: VolumeHistory? = null
constructor(context: Context?) : super(context) { constructor(context: Context?) : super(context) {
paint = initPaint() paint = initPaint()
@@ -85,8 +85,4 @@ class VolumeView : View {
yPrev = yNext yPrev = yNext
} }
} }
fun setVolumeHistory(volumeHistory: VolumeHistory?) {
this.volumeHistory = volumeHistory
}
} }