How to make an Android program 'wait'

后端 未结 8 1977
心在旅途
心在旅途 2020-12-16 02:23

I want to cause my program to pause for a certain number of milliseconds, how exactly would I do this?

I have found different ways such as Thread.sleep( time )

8条回答
  •  半阙折子戏
    2020-12-16 02:40

    Not sure why you want the program to pause. In case you wish to do some task in the background and use the results, look at AsyncTask. I had a similar question awhile back.

提交回复
热议问题