public final class Recycler extends Component
RecyclerView.com.facebook.litho.widget.RecyclerSpec| Modifier and Type | Class and Description | 
|---|---|
| static class  | Recycler.Builder | 
Component.ContainerBuilder<T extends Component.ContainerBuilder<T>>ComponentLifecycle.MountType, ComponentLifecycle.RenderData, ComponentLifecycle.TransitionContainer| Modifier and Type | Method and Description | 
|---|---|
| boolean | callsShouldUpdateOnMount() | 
| protected boolean | canMeasure()Whether this  ComponentLifecycleis able to measure itself according to specific size
 constraints. | 
| protected boolean | canPreallocate() | 
| static Recycler.Builder | create(ComponentContext context) | 
| static Recycler.Builder | create(ComponentContext context,
      int defStyleAttr,
      int defStyleRes) | 
| protected void | createInitialState(ComponentContext c) | 
| Object | dispatchOnEvent(EventHandler eventHandler,
               Object eventState) | 
| ComponentLifecycle.MountType | getMountType()This indicates the type of the  Objectthat will be returned byComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object). | 
| static EventHandler | getPTRRefreshEventHandler(ComponentContext context) | 
| protected StateContainer | getStateContainer() | 
| boolean | hasChildLithoViews()Whether this  ComponentLifecyclemounts views that contain component-based content that
 can be incrementally mounted e.g. | 
| protected boolean | hasState() | 
| boolean | isEquivalentTo(Component other)Compares this component to a different one to check if they are the same | 
| boolean | isPureRender() | 
| Recycler | makeShallowCopy() | 
| protected void | onBind(ComponentContext context,
      Object sectionsRecycler) | 
| protected void | onBoundsDefined(ComponentContext context,
               ComponentLayout layout)Called after the layout calculation is finished and the given  ComponentLayouthas its
 bounds defined. | 
| protected Object | onCreateMountContent(Context c)Create the object that will be mounted in the  LithoView. | 
| protected void | onMeasure(ComponentContext c,
         ComponentLayout layout,
         int widthSpec,
         int heightSpec,
         Size measureOutput) | 
| protected void | onMount(ComponentContext c,
       Object sectionsRecycler)Deploy all UI elements representing the final bounds defined in the given  ComponentLayout. | 
| static EventHandler<ReMeasureEvent> | onRemeasure(ComponentContext c) | 
| protected void | onUnbind(ComponentContext context,
        Object sectionsRecycler) | 
| protected void | onUnmount(ComponentContext context,
         Object sectionsRecycler)Unload UI elements associated with this component. | 
| protected static void | onUpdateMeasure(ComponentContext c,
               int measureVer) | 
| protected static void | onUpdateMeasureAsync(ComponentContext c,
                    int measureVer) | 
| protected static void | onUpdateMeasureSync(ComponentContext c,
                   int measureVer) | 
| protected int | poolSize() | 
| protected boolean | shouldAlwaysRemeasure() | 
| protected boolean | shouldUpdate(Component _prevAbstractImpl,
            Component _nextAbstractImpl)Whether the component needs updating. | 
| protected void | transferState(StateContainer _prevStateContainer,
             StateContainer _nextStateContainer) | 
bindDynamicProp, canResolve, clearCachedLayout, copyInterStageImpl, getCommonProps, getDynamicProps, getEventDispatcher, getHandle, getId, getKey, getScopedContext, getSimpleName, getSimpleNameDelegate, hasBackgroundSet, hasClickHandlerSet, measure, measureMightNotCacheInternalNode, recordEventTrigger, registerWorkingRange, retrieveValue, setScopedContext, updateInternalChildState, willRenderacceptTriggerEvent, applyPreviousRenderData, createMountContent, dispatchErrorEvent, dispatchErrorEvent, dispatchOnEnteredRange, dispatchOnExitedRange, getEventTrigger, getEventTrigger, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getTreePropsForChildren, hasAttachDetachCallback, implementsAccessibility, implementsExtraAccessibilityNodes, isLayoutSpecWithSizeSpecCheck, isMountSizeDependent, needsPreviousRenderData, newEventHandler, newEventTrigger, onAttached, onCreateLayout, onCreateLayoutWithSizeSpec, onCreateMountContentPool, onCreateTransition, onDetached, onError, onLoadStyle, onMeasureBaseline, onPopulateAccessibilityNode, onPopulateExtraAccessibilityNode, onPrepare, onShouldCreateLayoutWithNewSizeSpec, populateTreeProps, recordRenderData, resolve, shouldUseGlobalPoolprotected StateContainer getStateContainer()
getStateContainer in class Componentpublic boolean isEquivalentTo(Component other)
ComponentThis is used to be able to skip rendering a component again. We avoid using the Object.equals(Object) so we can optimize the code better over time since we don't have to
 adhere to the contract required for a equals method.
isEquivalentTo in interface Equivalence<Component>isEquivalentTo in class Componentother - the component to compare topublic Recycler makeShallowCopy()
makeShallowCopy in class Componentprotected void onMeasure(ComponentContext c, ComponentLayout layout, int widthSpec, int heightSpec, Size measureOutput)
onMeasure in class ComponentLifecycleprotected boolean canMeasure()
ComponentLifecycleComponentLifecycle is able to measure itself according to specific size
 constraints.canMeasure in class ComponentLifecycleprotected void onBoundsDefined(ComponentContext context, ComponentLayout layout)
ComponentLifecycleComponentLayout has its
 bounds defined. You can use ComponentLayout.getX(), ComponentLayout.getY(),
 ComponentLayout.getWidth(), and ComponentLayout.getHeight() to get the size and
 position of the component in the layout tree.onBoundsDefined in class ComponentLifecyclecontext - The Context used by this component.layout - The ComponentLayout with defined position and size.protected Object onCreateMountContent(Context c)
ComponentLifecycleLithoView.onCreateMountContent in class ComponentLifecyclec - The Context to be used to create the content.protected void onMount(ComponentContext c, Object sectionsRecycler)
ComponentLifecycleComponentLayout. Return either a Drawable or a View or null to be
 mounted.onMount in class ComponentLifecyclec - The ComponentContext to mount the component into.protected void onBind(ComponentContext context, Object sectionsRecycler)
onBind in class ComponentLifecycleprotected void onUnbind(ComponentContext context, Object sectionsRecycler)
onUnbind in class ComponentLifecycleprotected void onUnmount(ComponentContext context, Object sectionsRecycler)
ComponentLifecycleonUnmount in class ComponentLifecyclecontext - The Context for this mount operation.sectionsRecycler - The Drawable or View mounted by this component.protected boolean shouldUpdate(Component _prevAbstractImpl, Component _nextAbstractImpl)
ComponentLifecycleFor layout components, the framework will verify that none of the children of the component need updating, and that both components have the same number of children. Therefore this method just needs to determine any changes to the top-level component that would cause it to need to be updated (for example, a click handler was added).
For mount specs, the framework does nothing extra and this method alone determines whether the component is updated or not.
shouldUpdate in class ComponentLifecycle_prevAbstractImpl - the previous component to compare against._nextAbstractImpl - the component that is now in use.protected void createInitialState(ComponentContext c)
createInitialState in class ComponentLifecycleprotected boolean shouldAlwaysRemeasure()
shouldAlwaysRemeasure in class ComponentLifecyclepublic ComponentLifecycle.MountType getMountType()
ComponentLifecycleObject that will be returned by ComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object).getMountType in class ComponentLifecycleComponentLifecycle.MountTypeprotected int poolSize()
poolSize in class ComponentLifecycleprotected boolean canPreallocate()
canPreallocate in class ComponentLifecyclepublic boolean hasChildLithoViews()
ComponentLifecycleComponentLifecycle mounts views that contain component-based content that
 can be incrementally mounted e.g. if the mounted view has a LithoView with incremental mount
 enabled.hasChildLithoViews in class ComponentLifecyclepublic boolean callsShouldUpdateOnMount()
callsShouldUpdateOnMount in class ComponentLifecyclepublic boolean isPureRender()
isPureRender in class ComponentLifecyclepublic static EventHandler getPTRRefreshEventHandler(ComponentContext context)
public static EventHandler<ReMeasureEvent> onRemeasure(ComponentContext c)
public Object dispatchOnEvent(EventHandler eventHandler, Object eventState)
dispatchOnEvent in interface EventDispatcherdispatchOnEvent in class ComponentLifecycleprotected boolean hasState()
hasState in class ComponentLifecycleprotected void transferState(StateContainer _prevStateContainer, StateContainer _nextStateContainer)
ComponentLifecycletransferState in class ComponentLifecycleprotected static void onUpdateMeasure(ComponentContext c, int measureVer)
protected static void onUpdateMeasureAsync(ComponentContext c, int measureVer)
protected static void onUpdateMeasureSync(ComponentContext c, int measureVer)
public static Recycler.Builder create(ComponentContext context)
public static Recycler.Builder create(ComponentContext context, int defStyleAttr, int defStyleRes)