Class MobileUI


  • public class MobileUI
    extends Object
    Main Interface to the basic functions of MobileUI for your app.
    • Method Detail

      • firePropertyChanged

        public static void firePropertyChanged​(@Nonnull
                                               Object bindingContext,
                                               @Nonnull
                                               String... property)
        Fire that a property of the given bindingContext has changed. This will either add this information to the currently running EventContext (if this happends due to pending user input) or take the required action to fire the property on the UI thread. This method can securely be called from every location and thread.
        Parameters:
        bindingContext - the object with the currently changed property
        property - list of properties by name that have been changed
      • runOnUiThread

        public static void runOnUiThread​(@Nonnull
                                         Runnable runnable)
        Run on the system's UI-Thread, if we're not already there.
        Parameters:
        runnable - the action to execute on the UI thread
      • runOnUiThread

        public static void runOnUiThread​(@Nonnull
                                         Runnable runnable,
                                         long delay)
        Run on the system's UI-Thread after a given delay in ms
        Parameters:
        runnable - action to execute
        delay - delay in ms
      • inject

        public static void inject​(@Nonnull
                                  Object object)
        PURPLE Injects dependencies into the given object. Shortcut for MobileUI.getApplicationContext().inject(object).
        Parameters:
        object - the object to inject the dependencies into
        Since:
        0.4.0