Created
October 25, 2018 12:09
-
-
Save abohomol/c0492cdde48ea0ac830cd47af261630f 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
class SomeActivity : Activity() { | |
... | |
companion object { | |
fun newIntent(context: Context): Intent { | |
return Intent(context, SomeActivity::class.java) | |
} | |
} | |
} | |
/* From Java you can call this function this way: */ | |
Intent intent = SomeActivity.Companion.newIntent(context) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment