Android: What's the difference between Activity.runOnUiThread and View.post?
android
Solution
There is no real difference, except that the `View.post` is helpful when you don't have a direct access to the activity.
In both cases, if not on UI thread, `Handler#post(Runnable)` will be called behind the scenes.
As CommonsWare mentioned in the comment, there is a difference between the two - when called on Ui thread, `Activity#runOnUiThread` will call the `run` method directly, while `View#post` will post the `runnable` on the queue (e.g. call the `Handler#post`)
The important point IMO is that both have the same goal, and for whoever use it, there should be no difference (and the implementation may change in the future).
Problem
What's the difference between `Activity.runOnUiThread` and `View.post`, could someone, please, explain?