教你实现splash欢迎页面延迟跳转的6种方法
来源:互联网 发布:ai软件字体加粗 编辑:程序博客网 时间:2024/06/03 15:37
教你实现splash页面延迟跳转的六种方法(个人总结)
实现方式一: private void initSplashPage() { new Handler().postDelayed(new Runnable() { @Override public void run() { //跳转页面 Intent intent = new Intent(ShoppingCartActivity.this,spalsh.class); startActivity(intent); } }, 3000); }
实现方式二 private void initSplashPage() { Runnable runnable = new Runnable() { @Override public void run() { //跳转页面 Intent intent = new Intent(ShoppingCartActivity.this, spalsh.class); startActivity(intent); } }; new Handler().postDelayed(runnable, 3000); }
实现页面跳转方法三 private void initSplashPage() { new Thread(new Runnable() { @Override public void run() { try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } //睡3秒后跳转页面 //跳转页面 Intent intent = new Intent(ShoppingCartActivity.this, spalsh.class); startActivity(intent); } }).start(); }
实现页面跳转方法四 private void initSplashPage() { new Thread(new Runnable() { @Override public void run() { SystemClock.sleep(3000); //睡3秒后跳转页面 //跳转页面 Intent intent = new Intent(ShoppingCartActivity.this, spalsh.class); startActivity(intent); } }).start(); }
实现页面跳转方法五 private void initSplashPage() { new Thread(){ @Override public void run() {// super.run(); SystemClock.sleep(3000); //睡3秒后跳转页面 //跳转页面 Intent intent = new Intent(ShoppingCartActivity.this, spalsh.class); startActivity(intent); } }.start(); }
实现页面跳转方法六 private void initSplashPage() { new Thread(){ @Override public void run() {// super.run(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } //睡3秒后跳转页面 //跳转页面 Intent intent = new Intent(ShoppingCartActivity.this, spalsh.class); startActivity(intent); } }.start(); }
阅读全文
0 0
- 教你实现splash欢迎页面延迟跳转的6种方法
- 使用Handler延迟简单实现欢迎页面的跳转
- iOS中Splash欢迎页面的实现
- 教你如何实现 Splash 页面三秒跳转和动态下载最新背景图
- Android--延迟页面跳转实现方法
- Splash页面的跳转逻辑
- JS 跳转页面延迟方法
- JS 跳转页面延迟方法
- Android 实现延迟跳转的几种方法
- JQuery实现页面跳转 页面跳转的七种方法
- Splash Screen加载网络图片实现欢迎页的两种方法
- js页面跳转的6种方法
- zaker splash页面实现
- 页面自动跳转的几种实现方法
- 利用javascript实现页面跳转的几种方法
- 页面自动跳转的几种实现方法
- 页面自动跳转的几种实现方法 -- zz
- asp.net实现页面跳转的三种方法评测
- 程序人生的甘与苦
- 1059. C语言竞赛(20)
- 经验分享:双系统下丢失OS X系统引导的修复方法
- UVA11367 最短路 蓝书练习题
- android 打造真正的下拉刷新上拉加载recyclerview(一):使用
- 教你实现splash欢迎页面延迟跳转的6种方法
- 23种设计模式
- 百度云-分享一套史上最新最全最细-最好的没有之一的Mybatis视频教程-百度云
- 162. Find Peak Element
- 简单日志库
- linux定时任务crontab自动备份mysql数据库
- DenseNet算法详解
- fcc 225 Profile Lookup
- Type Object 写 物品属性