Run Handler messages in a background thread

前端 未结 5 1957
失恋的感觉
失恋的感觉 2020-12-04 19:09

I want to run some Runnable in a background thread. I want to use Handler because it\'s convenient for delays. What I mean is

handler.post(runnable, delay);
         


        
5条回答
  •  隐瞒了意图╮
    2020-12-04 19:56

    You can set up a Looper in a background thread using Looper.prepare() and Looper.loop.

    • http://developer.android.com/reference/android/os/Looper.html

提交回复
热议问题