public static void doOnMainThread(final OnMainThreadJob onMainThreadJob) {
        uiHandler.post(new Runnable() {
            @Override
            public void run() {
                onMainThreadJob.doInUIThread();
            }
        });
    }
public static void doOnMainThread ( final OnMainThreadJob onMainThreadJob ) { uiHandler . post ( new Runnable ( ) { @ Override public void run ( ) { onMainThreadJob . doInUIThread ( ) ; } } ) ; }
Executes the provided code immediately on the UI Thread
@param onMainThreadJob Interface that wraps the code to execute