public final class SingleComponentSection extends Section
com.facebook.litho.sections.common.SingleComponentSectionSpec
Modifier and Type | Class and Description |
---|---|
static class |
SingleComponentSection.Builder |
SectionLifecycle.StateContainer, SectionLifecycle.StateUpdate
Modifier and Type | Method and Description |
---|---|
static SingleComponentSection.Builder |
create(SectionContext context) |
protected void |
generateChangeSet(SectionContext context,
ChangeSet changeSet,
Section _prevAbstractImpl,
Section _nextAbstractImpl)
This method will delegate to the
DiffSectionSpec
method annotated with OnDiff |
protected boolean |
isDiffSectionSpec() |
boolean |
isEquivalentTo(Section other)
Compares this section to a different one to check if they are the same
|
SingleComponentSection |
makeShallowCopy(boolean deepCopy) |
getChildren, getEventDispatcher, getGlobalKey, getScopedContext, getSimpleName, getStateContainer, makeShallowCopy, recordEventTrigger, setChildren, setCount, setGlobalKey, setKey, setScopedContext
acceptTriggerEvent, acquireDiff, acquireOutput, bindService, createChildren, createInitialState, createService, dataBound, dataRendered, dispatchLoadingEvent, dispatchOnEvent, getEventTrigger, getLoadingEventHandler, getService, getTreePropsForChildren, newEventHandler, newEventHandler, newEventTrigger, populateTreeProps, refresh, releaseDiff, releaseOutput, requestFocus, requestFocus, requestFocus, requestFocusWithOffset, requestFocusWithOffset, requestFocusWithOffset, requestSmoothFocus, requestSmoothFocus, requestSmoothFocus, shouldUpdate, transferService, transferState, unbindService, viewportChanged
public boolean isEquivalentTo(Section other)
Section
This is used to be able to skip rendering a section 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 class Section
other
- the component to compare topublic SingleComponentSection makeShallowCopy(boolean deepCopy)
makeShallowCopy
in class Section
Section
.
if deepCopy is false the clone won't contain any children or count as it will
be returned in a pre - ChangeSet generation state.public static SingleComponentSection.Builder create(SectionContext context)
protected void generateChangeSet(SectionContext context, ChangeSet changeSet, Section _prevAbstractImpl, Section _nextAbstractImpl)
SectionLifecycle
DiffSectionSpec
method annotated with OnDiff
generateChangeSet
in class SectionLifecycle
protected boolean isDiffSectionSpec()
isDiffSectionSpec
in class SectionLifecycle