Last active
September 11, 2017 15:06
-
-
Save hluhovskyi/c671368d070133e7af746c01f6962bb1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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