public class TestTransitionComponent extends TestComponent
Modifier and Type | Class and Description |
---|---|
static class |
TestTransitionComponent.Builder |
Component.ContainerBuilder<T extends Component.ContainerBuilder<T>>
ComponentLifecycle.MountType, ComponentLifecycle.RenderData, ComponentLifecycle.TransitionContainer
mIsUnique
Modifier and Type | Method and Description |
---|---|
static TestTransitionComponent.Builder |
create(ComponentContext context,
Component component) |
static TestTransitionComponent.Builder |
create(ComponentContext context,
int defStyleAttr,
int defStyleRes,
Component component) |
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 Component |
onCreateLayout(ComponentContext c)
Generate a tree of
ComponentLayout representing the layout structure of the Component and its sub-components. |
Transition |
onCreateTransition(ComponentContext c) |
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, wasOnUnmountCalled
bindDynamicProp, canResolve, clearCachedLayout, copyInterStageImpl, getCommonProps, getDynamicProps, getEventDispatcher, getHandle, getId, getKey, getScopedContext, getSimpleName, getSimpleNameDelegate, getStateContainer, hasBackgroundSet, hasClickHandlerSet, makeShallowCopy, measure, measureMightNotCacheInternalNode, recordEventTrigger, registerWorkingRange, retrieveValue, setScopedContext, updateInternalChildState, willRender
acceptTriggerEvent, applyPreviousRenderData, callsShouldUpdateOnMount, canMeasure, canPreallocate, createInitialState, createMountContent, dispatchErrorEvent, dispatchErrorEvent, dispatchOnEnteredRange, dispatchOnExitedRange, getEventTrigger, getEventTrigger, getExtraAccessibilityNodeAt, getExtraAccessibilityNodesCount, getTreePropsForChildren, hasAttachDetachCallback, hasChildLithoViews, hasState, implementsAccessibility, implementsExtraAccessibilityNodes, isLayoutSpecWithSizeSpecCheck, isMountSizeDependent, isPureRender, needsPreviousRenderData, newEventHandler, newEventTrigger, onAttached, onBind, onBoundsDefined, onCreateLayoutWithSizeSpec, onCreateMountContent, onCreateMountContentPool, onDetached, onError, onLoadStyle, onMeasure, onMeasureBaseline, onMount, onPopulateAccessibilityNode, onPopulateExtraAccessibilityNode, onPrepare, onShouldCreateLayoutWithNewSizeSpec, onUnbind, onUnmount, poolSize, populateTreeProps, recordRenderData, resolve, shouldAlwaysRemeasure, shouldUseGlobalPool, transferState
public boolean shouldUpdate(Component previous, Component next)
ComponentLifecycle
For 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
previous
- the previous component to compare against.next
- the component that is now in use.protected Component onCreateLayout(ComponentContext c)
ComponentLifecycle
ComponentLayout
representing the layout structure of the Component
and its sub-components.onCreateLayout
in class ComponentLifecycle
c
- The ComponentContext
to build a ComponentLayout
tree.public ComponentLifecycle.MountType getMountType()
ComponentLifecycle
Object
that will be returned by ComponentLifecycle.mount(com.facebook.litho.ComponentContext, java.lang.Object)
.getMountType
in class ComponentLifecycle
ComponentLifecycle.MountType
public Transition onCreateTransition(ComponentContext c)
onCreateTransition
in class ComponentLifecycle
TransitionSet
specifying how to animate this component to its new layout and
props.public static TestTransitionComponent.Builder create(ComponentContext context, int defStyleAttr, int defStyleRes, Component component)
public static TestTransitionComponent.Builder create(ComponentContext context, Component component)
public int hashCode()
hashCode
in class TestComponent
public boolean equals(Object o)
equals
in class TestComponent