Made volumeHistory public
This commit is contained in:
@@ -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() }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user