ComponentsConfiguration
These values are safe defaults and should not require manual changes.
This class hosts all the config parameters that the ComponentTree configures it self .... enable and disable features ... A Component tree uses the .defaultComponentsConfiguration by default but a Builder can be used to create new instances of the config to override the default parameters ... The default config values can also be overridden by manually setting their values in .defaultBuilder
Types
This is a builder that only exists so that Java clients can have an easier time creating and overriding specific configurations. For Kotlin one can use directly the named parameters on the ComponentsConfiguration constructor.
Properties
Determines whether we log, crash, or do nothing if an invalid com.facebook.litho.ComponentHost view modification is detected.
Determines the pooling behavior for component hosts
Determines the policy to use when state reads across tree boundaries is detected.
This object provides a custom Runnable Handler where each handler holding a reference to single thread. The default value is a standard single Layout component thread.
This flag is used to independently enable the new behavior for State that detaches its identity from its value.
When true, animated values produced during the AnimationController frame callback are published through a same-frame invalidation path (StateUpdater.applyAnimationFrameUpdates) instead of the frame-deferred updateHookStateSync. When false, animation frames fall back to the previous frame-deferred behavior.
Visibility Events related
This flag enables child clipping by default
Lifecycle Owner in BaseMountingView and TreeProp
This flag is used to enable a fix for the issue where components that match the host view size do not get unmounted when they go out of the viewport.
This flag enables the new collection infra
This flag is used to enable the new state read tracking logic.
This class is an error event handler that clients can optionally set on a ComponentTree to gracefully handle uncaught/unhandled exceptions thrown from the framework while resolving a layout.
Determines the policy to use when an event handler is created with the ComponentContext of a component other than the one that owns the handler.
How this tree uses the gap worker: off, premount, cost-aware premount, or cost-aware premount that also releases seen items as they leave the screen. See GapWorkerMode.
Whether the com.facebook.rendercore.MountState can be mounted using incremental mount.
When enabled the framework will add an additional binder to Host RenderUnits to clean up view attributes that may have been added by non-litho code.
This flag is used to trigger a log whenever a recursive state provider scope is detected
Determines the policy to use when measuring in resolve phase is detected.
This will perform an optimization that will verify if the same size specs were used. However, this creates a bug in a specific scenario where double measure happens.
The handler ComponentTree will be used to run the pre-allocation process
This defines which strategy we will use to bind the com.facebook.litho.sections.widget.ExperimentalRecycler.
When true, a visibility hint set via the deprecated com.facebook.litho.BaseMountingView.setVisibilityHint API is cleared when the ComponentTree is detached from its view. Without this, a view hinted invisible before being recycled or rebound keeps refusing to mount once it hosts new content, rendering as correctly sized blank space.
Determines the policy to use when a state update is performed with the ComponentContext of a component other than the one that owns the state. Defaults to LogicViolationPolicy.LOG so the newly-added assertion can be observed via com.facebook.litho.debug.DebugInfoReporter before being promoted to LogicViolationPolicy.CRASH.
This flag is used to enable the use of default item animators in lazy collections, so that the behavior is compatible to what exists nowadays in the com.facebook.litho.sections.widget.RecyclerCollectionComponent.
When true, uses an empty visible rect for visibility processing when the root host view is detached from the window. This causes all visibility outputs to be treated as invisible, properly firing InvisibleEvent, UnfocusedVisibleEvent, etc. This prevents incorrect visibility events caused by android.view.View.getLocalVisibleRect returning stale/full rects for detached views. Uses android.view.View.isAttachedToWindow which remains true during temporary detaches (e.g. RecyclerView item recycling), so those legitimate cases are not affected.
When true, the legacy Row/Column builder's build() returns a KRow/KColumn (com.facebook.litho.layout.flexbox.FlexboxContainerComponent) carrying a Style, instead of a legacy SpecGenerated Row/Column. Guards the migration of the legacy builders onto the Kotlin flexbox components.
When enabled, contextual effects use the optimized handler implementation.
Use postAtFront for layout promotion to prioritize background layout results
When true, only use postAtFront for the first background layout promotion per ComponentTree
Determines whether we should enable stable ids by default in the com.facebook.litho.widget.RecyclerBinder
This flag enables the use of Component State for cached values
When true, view style properties use onBindViewWithDescription binders instead of ViewAttributes.
Whether the com.facebook.LithoView associated with the com.facebook.litho.ComponentTree will process visibility events.