Companion
Properties
Caches, per class, the @Comparable-annotated fields that com.facebook.litho.ComponentUtils.hasEquivalentFields compares, together with their resolved comparison type and with accessibility already forced.
Active pool size for collection layout handler provider
Pool size for collection layout handler provider
Thread priority for collection layout handler threads
This flag is to enable usage custom pool scopes
The default priority for threads that perform background layout calculations.
The default priority for threads that perform background sections change set calculations.
Controls whether collection item preparation should be disabled on the UI thread.
Enables the use of a collection-specific layout handler provider for improved performance
Enables a default visibility events controller in LithoView to handle visibility events
Enables double measurement for grid layouts.
Enables dynamic sizing of handler pools based on usage patterns
When enabled, additional main thread assertions will be performed in ComponentHost methods that were not previously checked.
This flag is used to enable a fix for the issue where the text is not truncated correctly when customEllipsisText is set.
Enables a fix for input connection.
This flag is to enable usage of new onTouch behaviour within TextSpec touchableSpan
Dispatches Style.onPopulateAccessibilityNode on hosts that have neither a node-info handler nor an accessible mount item. Without it the handler never runs on such hosts, e.g. a clickable Row whose text is hosted by its own view.
This flag enables the use of the main thread priority when raising the priority of a blocking thread on main
When enabled, a main thread assertion will be performed in ComponentHost.requestLayout. This is separate from enableExpandedComponentHostMainThreadChecks because requestLayout was found to be called off the main thread significantly more than other methods.
When enabled, the reduction pass caches subtree index ranges and splices unchanged subtrees from the previous LayoutState instead of re-traversing them.
Guards against ANR in TextDrawable touch handling caused by expensive Layout.getOffsetForHorizontal() calls on complex text. When enabled, skips redundant span lookup on MOVE events in the old handleTouchForSpans path.
Enables dispatching working ranges that were registered on a deferred node holder. Without it, a spec whose layout is delegated to a component that defers resolution loses its working ranges, because the registrations land on the holder and nothing reads them there.
Fixes RTL custom ellipsis truncation by converting ellipsisTarget to a run-relative advance (layoutWidth - ellipsisTarget) before passing to Paint.getOffsetForAdvance for RTL text.
By default end-to-end tests will disable transitions and this flag lets to explicitly enable transitions to test animation related behavior.
Initialize sticky header during layout when its component tree is null
This is just a proxy to LithoDebugConfigurations.isDebugHierarchyEnabled. We have to keep it until we release a new oss version and we can refer to LithoDebugConfigurations directly on Flipper.
This is just a proxy to LithoDebugConfigurations.isDebugModeEnabled. We have to keep it until we release a new oss version and we can refer to LithoDebugConfigurations directly on Flipper.
Populates additional metadata to find mounted components at runtime. Defaults to the presence of an
This config will enable logging of interactable components with 0 alpha
When enabled, a layout-only pass (same resolve, new size specs) takes its RenderState from the resolve snapshot instead of the last committed layout. The committed layout's render data is written on the main thread at mount, so copying it on a layout thread can throw a ConcurrentModificationException. Layout-scoped state still carries over from the committed layout.
When enabled, the trace section name in EventHandler.dispatchEvent is lazily evaluated, avoiding string allocation on every dispatch when systrace is not active.
The minimum touch-target size, in dp, used by useAutoTouchExpansion. Defaults to 48dp.
Policy for interactive components smaller than minTouchTargetSizeDp. LogicViolationPolicy.LOG reports each one via com.facebook.litho.debug.DebugInfoReporter to measure the opportunity; LogicViolationPolicy.NONE (default) is a no-op. A sub-minimum touch target is never fatal, so LogicViolationPolicy.CRASH is treated as LogicViolationPolicy.LOG. Independent of useAutoTouchExpansion.
Whether we need to account for lack of synchronization while accessing Themes.
Marks a deferred node (RenderWithConstraints, a Component.measure holder) dirty when the layout cache copies its subtree whole, so Yoga measures it under the constraints of this pass. Without it, Yoga can reuse a size the node measured in the last pass under other constraints, and its content is laid out only at that size.
When true, TextInputComponentSpec.EditTextWithEventHandlers.onTextChanged stores a detached SpannableStringBuilder snapshot in savedText instead of the live buffer owned by the underlying EditText. This eliminates a TOCTOU race that crashes with IndexOutOfBoundsException in TextInputComponentSpec.createAndMeasureEditText when the layout thread reads the live buffer while the user concurrently mutates it on the main thread.
Gives every mounted TextInput MATCH_PARENT layout params, as its shouldUseMatchParentLayoutParams prop does for one input. Litho sizes the EditText itself, so the default WRAP_CONTENT params only make every edit request a layout up to the window root.
Indicates that the incremental mount helper is required for this build.
When true, the shared Litho com.facebook.yoga.YogaConfig (built by com.facebook.litho.yoga.LithoYogaFactory.createYogaConfig) clears the MinSizeUndefinedInsteadOfAuto errata bit, enabling CSS Flexbox §4.5 automatic minimum sizing for every flex item. Each item whose main-axis min-{width,height} is undefined gets a content-derived floor — min(min-content, specified-size, max-size) plus any aspect-ratio-transferred lower bound — so it cannot shrink below what CSS browsers would honor.
When true, interactive components smaller than minTouchTargetSizeDp have their touch target (not their visual bounds) expanded to that minimum, augmenting any manual com.facebook.litho.view.touchExpansion.
When a collection item is bound and its renderer already has a layout committed for the same size constraints, show that layout and render the current component in the background instead of rendering it synchronously on the main thread.
When true, IMOs are created with hostOutput=null during reduce (skipping per-child ensureHostBounds), and host bounds are finalized in a single bottom-up pass after reduce. Eliminates N recursive ensureHostBounds calls, replacing with N flat comparisons.
When true, uses memory-efficient structural GlobalKey instead of concatenated strings.
This flag is to enable usage of Primitive Text
This flag is to enable usage of Primitive TextInput
Use SpannableString instead of SpannedString in TextInput to fix ClassCastException.
This flag is to enable usage of text with spans when measuring Primitive TextInput