public static class RecyclerBinder.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
RecyclerBinder |
build(ComponentContext c) |
RecyclerBinder.Builder |
canCacheDrawingDisplayLists(boolean canCacheDrawingDisplayLists) |
RecyclerBinder.Builder |
canPrefetchDisplayLists(boolean canPrefetchDisplayLists) |
RecyclerBinder.Builder |
componentTreeHolderFactory(com.facebook.litho.widget.RecyclerBinder.ComponentTreeHolderFactory componentTreeHolderFactory) |
RecyclerBinder.Builder |
isCircular(boolean isCircular)
Whether the underlying RecyclerBinder will have a circular behaviour.
|
RecyclerBinder.Builder |
layoutHandlerFactory(LayoutHandlerFactory layoutHandlerFactory) |
RecyclerBinder.Builder |
layoutInfo(LayoutInfo layoutInfo) |
RecyclerBinder.Builder |
lithoViewFactory(LithoViewFactory lithoViewFactory) |
RecyclerBinder.Builder |
rangeRatio(float rangeRatio) |
public RecyclerBinder.Builder rangeRatio(float rangeRatio)
rangeRatio
- specifies how big a range this binder should try to compute. The range is
computed as number of items in the viewport (when the binder is measured) multiplied by the
range ratio. The ratio is to be intended in both directions. For example a ratio of 1 means
that if there are currently N components on screen, the binder should try to compute the
layout for the N components before the first component on screen and for the N components
after the last component on screen. If not set, defaults to 4f.public RecyclerBinder.Builder layoutInfo(LayoutInfo layoutInfo)
layoutInfo
- an implementation of LayoutInfo
that will expose information about
the LayoutManager
this RecyclerBinder will use. If not set, it will default to a
vertical list.public RecyclerBinder.Builder layoutHandlerFactory(LayoutHandlerFactory layoutHandlerFactory)
layoutHandlerFactory
- the RecyclerBinder will use this layoutHandlerFactory when
creating ComponentTree
s in order to specify on which thread layout calculation
should happen.public RecyclerBinder.Builder lithoViewFactory(LithoViewFactory lithoViewFactory)
public RecyclerBinder.Builder canPrefetchDisplayLists(boolean canPrefetchDisplayLists)
public RecyclerBinder.Builder canCacheDrawingDisplayLists(boolean canCacheDrawingDisplayLists)
public RecyclerBinder.Builder isCircular(boolean isCircular)
public RecyclerBinder.Builder componentTreeHolderFactory(com.facebook.litho.widget.RecyclerBinder.ComponentTreeHolderFactory componentTreeHolderFactory)
componentTreeHolderFactory
- Factory to acquire a new ComponentTreeHolder. Defaults to
RecyclerBinder.DEFAULT_COMPONENT_TREE_HOLDER_FACTORY
.public RecyclerBinder build(ComponentContext c)
c
- The ComponentContext
the RecyclerBinder will use.