Show android layout for x seconds

Asked

Viewed 75 times

1

Good, I intend to show a layout for 5 seconds. I’ve seen examples of how to do this as soon as the application opens, but what I want to do is show a layout for 5 seconds while running the application, that is, if a button is pressed shows this layout for 5 seconds and then continues the application.

Some solution?

  • What you mentioned when the application opens is called Splash Screen and you can use similar features that are used when creating a Splash Screen, such as setting the time when the screen will be open, in your case 5 seconds.

1 answer

0

Fires a clock (based on the current time) like this on the onClick button and when time = 5 seconds, kills Activity with Finish(); or kills the layout.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.