SyntaxFix
Write A Post
Hire A Developer
Questions
Following a solution for Kotlin programmers (from API 22)
val res = context?.let { ContextCompat.getDrawable(it, R.id.any_resource }