RecyclerBinderConfig
This configuration is meant to be used in the context of RecyclerBinder. It allows you to define to define specific behavior changes to the default behaviour of the RecyclerBinder.
At this point, we are still in a transition phase where a lot of configs still live in the RecyclerBinder.Builder, but we aim to move all of them here.
Constructors
Properties
Defines if an overriding com.facebook.litho.config.ComponentsConfiguration should be used in the com.facebook.litho.ComponentTree used in the RecyclerBinder hierarchy.
Set pool for pre-computing and storing ComponentTree, which can be used to pre-compute and store ComponentTrees before they are inserted in a RecyclerBinder.
Specifies how a Collection will wrap its contents across the cross axis.
If set, the RecyclerView adapter will have stableId support turned on. Please note that this configuration will be disregarded in case isCircular is set to true
. If not set, it will follow the default value set for the ComponentsConfiguration
This is used in very specific cases on critical performance paths where measuring the first item cannot be relied on to estimate the viewport count. It should not be used in the common case, use with caution.
Experimental. Configuration to change the behavior of HScroll's when they are nested within a vertical scroll. With this mode, the hscroll will attempt to compute all layouts in the background before mounting so that no layouts are computed on the main thread. All subsequent insertions will be treated with LAYOUT_BEFORE_INSERT policy to ensure those layouts also do not happen on the main thread.
Whether the underlying RecyclerBinder will have a circular behaviour. Defaults to false.
Set the number of offscreen views to retain before adding them to the potentially shared recycled view pool.
The RecyclerBinder will use this LayoutHandlerFactory when creating com.facebook.litho.ComponentTree in order to specify on which thread layout calculation should happen. Setting it to null means that the computation will be done in the background thread.
The factory that will be used to create the nested com.facebook.litho.LithoView inside Section/LazyCollection.
The strategy to make Recycler stick to the last unseen item while pagination, which is only supposed to be used in full screen size surfaces like Reels.
Ratio to determine the number of components before and after the androidx.recyclerview.widget.RecyclerView's total number of currently visible items to have their com.facebook.litho.Component layout computed ahead of time.
Set whether item prefetch should be enabled on the underlying RecyclerView.LayoutManager. Defaults to false.
Enable pre-mounting for pre-fetched items, which requires to turn on RecyclerView's item prefetching first.
If true, the RecyclerBinder will measure the parent height by the height of children if the orientation is vertical, or measure the parent width by the width of children if the orientation is horizontal.