Android: On Hold Button Increase the Value — Kotlin

First, The Code For Timer ….

private var count = 10val upCountDownTimer: CountDownTimer = object : CountDownTimer(Long.MAX_VALUE, 500) {
override fun onTick(l: Long) {
count++
}

override fun onFinish() {}
}
val downCountDownTimer: CountDownTimer = object : CountDownTimer(Long.MAX_VALUE, 500) {
override fun onTick(l: Long) {
count--
}

override fun onFinish() {}
}
up.setOnTouchListener { _, event ->
if (event.action == MotionEvent.ACTION_DOWN) {
upCountDownTimer.start();
}
if (event.action == MotionEvent.ACTION_UP) {
upCountDownTimer.cancel();
}
true
}
down.setOnTouchListener { _, event ->
if (event.action == MotionEvent.ACTION_DOWN) {
downCountDownTimer.start();
}
if (event.action == MotionEvent.ACTION_UP) {
downCountDownTimer.cancel();
}
true
}
CountDownTimer(Long.MAX_VALUE, XXX)