在Android应用程序的结束闪屏 [英] Splash Screen at End of Android Application

查看:331
本文介绍了在Android应用程序的结束闪屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个结束的启动画面应该拿出在应用程序的结束,作为我在最后一页退出按钮,所以我想,当有人点击退出按钮应该出现有3秒钟再见页面一个形象和轻柔的音乐铃音,然后应用程序会自动结束了,我很困惑我应该如何在我的应用程序解决这个尾页,我想着code。在退出按钮的click事件,并通过意图开始再见页面,那么如何code?所以,它应该轻柔的音乐在3秒后退出应用程序外,还需有什么变化,我有在该androidMainfest文件进行。

I want to create an ending splash screen that should come up at the end of the application as i have exit button in the last page so i want that when someone clicks on exit button a good bye page should appear for 3 seconds having a image and soft music tone and then application should automatically end, i am confused how should i fix this end page in my application, i am thinking to code at click event of exit button and via intent start the good bye page and then how to code?, so that it should exit out of application after 3 seconds of soft music, also what changes i have to make in the androidMainfest file for that.

推荐答案

在您结束飞溅活动的onCreate方法开始CountDownTimer,将其设置为3000后完成milisenconds并在其onfinish事件处理程序写activity.finish。另外,你需要调用再见页面startactivity之后调用activity.finish()在最后一页的活动。

start a CountDownTimer in your ending splash activity's oncreate method, set it to finish after 3000 milisenconds and write activity.finish in its onfinish event handler. also, you need to call activity.finish() in your last page activity after calling startactivity of the good bye page.

这篇关于在Android应用程序的结束闪屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆