public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Handler
/*
* r:线程
* delayMillis:控制线程时间
*/
new Handler().postDelayed(
new Runnable() {
@Override
public void run() {
// 写跳转
Intent intent = new Intent();
intent.setClass(MainActivity.this,LoginActivity.class);
startActivity(intent);
}
}, 3000);
}
}
- 7 回答
- 0 关注
- 4633 浏览
添加回答
举报
0/150
提交
取消