Last active
May 5, 2020 14:42
-
-
Save BeokBeok/d583081d23929289d435faff6e73264a to your computer and use it in GitHub Desktop.
제네릭을 활용한 startActivity 함수 간편하게 사용하기
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
inline fun <reified T : Activity> Context.startActivity() { | |
val intent = Intent(this, T::class.java) | |
startActivity(intent) | |
} | |
startActivity<MainActivity>() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment