Skip to content

Instantly share code, notes, and snippets.

@hluhovskyi
Last active September 12, 2017 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hluhovskyi/0336401bab0adc103bc36aace6bdba6b to your computer and use it in GitHub Desktop.
Save hluhovskyi/0336401bab0adc103bc36aace6bdba6b to your computer and use it in GitHub Desktop.
val View.contextProvider: () -> Context
get() = this::getContext
val Activity.contextProvider: () -> Context
get() = { this }
val Fragment.contextProvider: () -> Context
get() = this::getContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment