Skip to content

Instantly share code, notes, and snippets.

View abdullahi-usman's full-sized avatar
🏠
Working from home

Abdullahi Usman abdullahi-usman

🏠
Working from home
View GitHub Profile
@abdullahi-usman
abdullahi-usman / RandomColorStringGenerator.kts
Last active February 16, 2020 17:33
Generates Random Color String
import java.lang.StringBuilder
import kotlin.random.Random
fun generateRandomColorString(): String {
val numNum = Random.nextInt(1, 6)
val alphaNum = 6 - numNum
val string = StringBuilder()
@abdullahi-usman
abdullahi-usman / CountDownTimer.kt
Created February 16, 2020 17:28
Modified version of Android's CountDownTimer with option to run indefinately.
package com.dahham.ora
import android.os.Handler
import android.os.Message
import android.os.SystemClock
abstract class CountDownTimer
/**
* @param millisInFuture The number of millis in the future from the call
* to [.start] until the countdown is done and [.onFinish]