0

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.

user1161410
  • 49
  • 1
  • 10

2 Answers2

0

Just start the ExitActivity with the button and then run an CountDownTimer for 3 seconds which then calls the intent for the HomeScreen like here

Community
  • 1
  • 1
tobi.b
  • 224
  • 2
  • 12
0

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.

hago
  • 1,700
  • 2
  • 16
  • 18