Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
fun main() {
val classThree = ClassThree()
val color3 = classThree.obtainColor(context, R.color.my_color, ContextCompat::getColor)
class ClassThree {
fun obtainColor(context: Context, colorRes: Int, colorLookup: (Context, Int) -> Int) = colorLookup(context, colorRes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment