Skip to content

Instantly share code, notes, and snippets.

View SoundBoard.kt
class SoundBoard(val ctx: Context) {
companion object {
private const val DELAY_BETWEEN_SOUNDS = 100L
private const val ADDITIONAL_DELAY_FOR_INVOCATION = 1000L
}
private val parentJob = Job()
private val handler = CoroutineExceptionHandler { _, throwable ->
Log.e(":::SoundBoard", "@handler -> exception ${throwable.message}")
View RulerView.kt
class RulerView @JvmOverloads constructor(ctx: Context, attrs: AttributeSet? = null) : View(ctx, attrs), AnkoLogger {
private var centimeters: Int = 0
private var cmSize = 0f
private val lPaint = Paint()
private val tPaint = TextPaint()
companion object {