In the viewpoint of running code in the UI thread, is there any difference between:
MainActivity.this.runOnUiThread(new Runnable() { public void run() {
use Handler
new Handler(Looper.getMainLooper()).post(new Runnable() { @Override public void run() { // Code here will run in UI thread } });