Class LayoutConfig


  • public class LayoutConfig
    extends Object
    Configuration for MobileUILayouts on Android and iOS. This configuration has a builder-api and can be used for the MobileUILayout constructors on both platforms.
    Since:
    0.4.0
    • Method Detail

      • with

        @Nonnull
        public static LayoutConfig with​(@Nonnull
                                        String layout)
        Constructs a configuration for the layout resource given here.
        Parameters:
        layout - the layout resource
        Returns:
        the layout config
      • bind

        @Nonnull
        public LayoutConfig bind​(@Nonnull
                                 Object bindingContext)
        Binds the given object ad binding context to the layout
        Parameters:
        bindingContext - the binding context
        Returns:
        the layout config
      • bindBeanOfType

        @Nonnull
        public LayoutConfig bindBeanOfType​(@Nonnull
                                           Class<?> bindingContextType)
        PURPLE Binds a bean of the given type, loading it from the dependency injection container. This method is only available, if you have mobileui-inject on your classpath.
        Parameters:
        bindingContextType - the type of bean that should be bound. It will be loaded from the dependency injection container.
        Returns:
        the layout config
      • bindBeanOfType

        @Nonnull
        public <T> LayoutConfig bindBeanOfType​(@Nonnull
                                               Class<T> bindingContextType,
                                               @Nonnull
                                               Qualifier<T> qualifier)
        PURPLE Binds a bean of the given type and qualifier, loading it from the dependency injection container. This method is only available, if you have mobileui-inject on your classpath.
        Type Parameters:
        T - the type parameter
        Parameters:
        bindingContextType - the type of bean that should be bound. It will be loaded from the dependency injection container.
        qualifier - the qualifier of the bean
        Returns:
        the layout config
      • bindTestObject

        @Nonnull
        public LayoutConfig bindTestObject()
        Sets the flag to bind to the test object given in the layout resource.
        Returns:
        the layout config
      • getTemplateExtVars

        @Nonnull
        public Map<String,​Object> getTemplateExtVars()
        Gets the template ext vars.
        Returns:
        the template ext vars
      • getLayoutResource

        @Nonnull
        public String getLayoutResource()
        Gets the layout resource.
        Returns:
        the layout resource
      • getBindingContext

        @Nonnull
        public Object getBindingContext()
        Gets the binding context.
        Returns:
        the binding context
      • isBindTestObject

        public boolean isBindTestObject()
        Returns the flag for the testObject usage.
        Returns:
        the boolean