How to start a different activity with some delay after pressing a button in android?

后端 未结 7 739
感动是毒
感动是毒 2020-12-30 04:14

I want that a new activity should start with some delay on pressing a button. Is it possible to do that , and whats the procedure.

7条回答
  •  青春惊慌失措
    2020-12-30 04:44

    You can use the method postDelayed(Runnable action, long delayMillis) of a View to add a Runnable to the message queue to be run after an (approximate) delay.

提交回复
热议问题