onFragment
Runs a given action on the current Activity's main thread.
Note that you should never keep Fragment reference passed into your action because it can be recreated at anytime during state transitions.
Throwing an exception from action makes the host Activity crash. You can inspect the exception in logcat outputs.
This method cannot be called from the main thread.