public class TestLayoutComponent extends TestComponent
| Modifier and Type | Class and Description |
|---|---|
static class |
TestLayoutComponent.Builder |
Component.ContainerBuilder<T extends Component.ContainerBuilder<T>>ComponentLifecycle.MountType, ComponentLifecycle.RenderData, ComponentLifecycle.TransitionContainermIsUnique| Modifier and Type | Method and Description |
|---|---|
protected boolean |
callsShouldUpdateOnMount() |
static TestLayoutComponent.Builder |
create(ComponentContext context) |
static TestLayoutComponent.Builder |
create(ComponentContext context,
boolean callsShouldUpdateOnMount,
boolean isPureRender) |
static TestLayoutComponent.Builder |
create(ComponentContext context,
int defStyleAttr,
int defStyleRes) |
static TestLayoutComponent.Builder |
create(ComponentContext context,
int defStyleAttr,
int defStyleRes,
boolean callsShouldUpdateOnMount,
boolean isPureRender,
boolean hasMountSpecChild,
boolean isDelegate) |
boolean |
equals(Object o) |
ComponentLifecycle.MountType |
getMountType()
This indicates the type of the
Object that will be returned by ComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object). |
int |
hashCode() |
protected boolean |
isPureRender() |
protected Component |
onCreateLayout(ComponentContext c)
Generate a tree of
ComponentLayout representing the layout structure of the Component and its sub-components. |
boolean |
shouldUpdate(Component previous,
Component next)
Whether the component needs updating.
|
dispatchOnEvent, getDispatchedEventHandlers, getEventState, isBound, isEquivalentTo, isEquivalentToCalled, isMounted, resetInteractions, wasMeasureCalled, wasOnAttachedCalled, wasOnBindCalled, wasOnBoundsDefinedCalled, wasOnDetachedCalled, wasOnMountCalled, wasOnUnbindCalled, wasOnUnmountCalledbindDynamicProp, canResolve, clearCachedLayout, copyInterStageImpl, getCommonProps, getDynamicProps, getEventDispatcher, getHandle, getId, getKey, getScopedContext, getSimpleName, getSimpleNameDelegate, getStateContainer, hasBackgroundSet, hasClickHandlerSet, makeShallowCopy, measure, measureMightNotCacheInternalNode, recordEventTrigger, registerWorkingRange, retrieveValue, setScopedContext, updateInternalChildState, willRenderacceptTriggerEvent, applyPreviousRenderData, canMeasure, canPreallocate, createInitialState, createMountContent, dispatchErrorEvent, dispatchErrorEvent, dispatchOnEnteredRange, dispatchOnExitedRange, getEventTrigger, getEventTrigger, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getTreePropsForChildren, hasAttachDetachCallback, hasChildLithoViews, hasState, implementsAccessibility, implementsExtraAccessibilityNodes, isLayoutSpecWithSizeSpecCheck, isMountSizeDependent, needsPreviousRenderData, newEventHandler, newEventTrigger, onAttached, onBind, onBoundsDefined, onCreateLayoutWithSizeSpec, onCreateMountContent, onCreateMountContentPool, onCreateTransition, onDetached, onError, onLoadStyle, onMeasure, onMeasureBaseline, onMount, onPopulateAccessibilityNode, onPopulateExtraAccessibilityNode, onPrepare, onShouldCreateLayoutWithNewSizeSpec, onUnbind, onUnmount, poolSize, populateTreeProps, recordRenderData, resolve, shouldAlwaysRemeasure, shouldUseGlobalPool, transferStatepublic boolean shouldUpdate(Component previous, Component next)
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 ComponentLifecycleprevious - the previous component to compare against.next - the component that is now in use.protected boolean callsShouldUpdateOnMount()
callsShouldUpdateOnMount in class ComponentLifecycleprotected boolean isPureRender()
isPureRender in class ComponentLifecycleprotected Component onCreateLayout(ComponentContext c)
ComponentLifecycleComponentLayout representing the layout structure of the Component and its sub-components.onCreateLayout in class ComponentLifecyclec - The ComponentContext to build a ComponentLayout tree.public ComponentLifecycle.MountType getMountType()
ComponentLifecycleObject that will be returned by ComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object).getMountType in class ComponentLifecycleComponentLifecycle.MountTypepublic static TestLayoutComponent.Builder create(ComponentContext context, int defStyleAttr, int defStyleRes)
public static TestLayoutComponent.Builder create(ComponentContext context, int defStyleAttr, int defStyleRes, boolean callsShouldUpdateOnMount, boolean isPureRender, boolean hasMountSpecChild, boolean isDelegate)
public static TestLayoutComponent.Builder create(ComponentContext context)
public static TestLayoutComponent.Builder create(ComponentContext context, boolean callsShouldUpdateOnMount, boolean isPureRender)
public int hashCode()
hashCode in class TestComponentpublic boolean equals(Object o)
equals in class TestComponent