如何在处理程序
中将java转换为kotlinnew Handler().postDelayed(new Runnable(){
@Override
public void run() {
/* Create an Intent that will start the Menu-Activity. */
Intent mainIntent = new Intent(Splash.this,Menu.class);
Splash.this.startActivity(mainIntent);
Splash.this.finish();
}
}, 3000);
答案 0 :(得分:24)
Handler().postDelayed({
/* Create an Intent that will start the Menu-Activity. */
val mainIntent = Intent(this, Menu::class.java)
startActivity(mainIntent)
finish()
}, 3000)