Which thread does Runnable run on?
问题 I want to update UI every 100ms. After searching in StackOverflow, I found a solution using Runnable and Handler like this final Handler handler = new Handler(); Runnable runnable = new Runnable() { @Override public void run() { //update UI here handler.postDelayed(this, 100); } }; runnable.run(); It works! But I have some questions: Which thread does this Runnable run on? MainThread or another thread? Here is the docs about postDelay Handler is attached MainThread, so is Runnable running on