1. 程式人生 > >Kotlin實現Activity跳轉(startActivity)

Kotlin實現Activity跳轉(startActivity)

方式一

val intent = Intent(context, SecondActivity().javaClass)
startActivity(intent)

方式二

val intent = Intent(context, SecondActivity::class.java)
startActivity(intent)

安卓開發技術分享: https://blog.csdn.net/yinxing2008/article/details/84555061