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

Link copied to clipboard
class Builder

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.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Determines whether we log, crash, or do nothing if an invalid com.facebook.litho.ComponentHost view modification is detected.

Link copied to clipboard

Determines the pooling behavior for component hosts

Link copied to clipboard

Determines the policy to use when state reads across tree boundaries is detected.

Link copied to clipboard

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.

Link copied to clipboard

This flag is used to independently enable the new behavior for State that detaches its identity from its value.

Link copied to clipboard

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.

Link copied to clipboard

Visibility Events related

Link copied to clipboard

This flag enables child clipping by default

Lifecycle Owner in BaseMountingView and TreeProp

Link copied to clipboard

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.

Link copied to clipboard

This flag enables the new collection infra

Link copied to clipboard

This flag is used to enable the new state read tracking logic.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
val gapWorkerMode: GapWorkerMode

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.

Link copied to clipboard

Whether the com.facebook.rendercore.MountState can be mounted using incremental mount.

Link copied to clipboard

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.

Link copied to clipboard

This flag is used to trigger a log whenever a recursive state provider scope is detected

Link copied to clipboard
val logTag: String? = null
Link copied to clipboard

Determines the policy to use when measuring in resolve phase is detected.

Link copied to clipboard

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.

Link copied to clipboard

The handler ComponentTree will be used to run the pre-allocation process

Link copied to clipboard

This defines which strategy we will use to bind the com.facebook.litho.sections.widget.ExperimentalRecycler.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

When enabled, contextual effects use the optimized handler implementation.

Link copied to clipboard

Use postAtFront for layout promotion to prioritize background layout results

When true, only use postAtFront for the first background layout promotion per ComponentTree

Link copied to clipboard

Determines whether we should enable stable ids by default in the com.facebook.litho.widget.RecyclerBinder

Link copied to clipboard

This flag enables the use of Component State for cached values

Link copied to clipboard

When true, view style properties use onBindViewWithDescription binders instead of ViewAttributes.

Link copied to clipboard
val visibilityBoundsTransformer: VisibilityBoundsTransformer? = null
Link copied to clipboard

Whether the com.facebook.LithoView associated with the com.facebook.litho.ComponentTree will process visibility events.