Skip to content

Instantly share code, notes, and snippets.

@hluhovskyi hluhovskyi/medium_10.kt
Last active Sep 11, 2017

Embed
What would you like to do?
interface ContextProvdier {
fun provideContext(): Context
}
class OwnActivity : AppCompatActivity(), ContextProvider {
fun provideContext() = this
}
class OwnFragment : Fragment(), ContextProvider {
fun provideContext() = context
}
class OwnView : View, ContextProvider {
fun provideContext() = context
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.