Decorator to create automatically a :class:`Runnable` object with the
    function. The function will be delayed and call into the Activity thread.

def run_on_ui_thread(f):
    '''Decorator to create automatically a :class:`Runnable` object with the
    function. The function will be delayed and call into the Activity thread.
    '''
    def f2(*args, **kwargs):
        Runnable(f)(*args, **kwargs)
    return f2