public final class SingleComponentSection extends Section
final Section loadingSection = SingleComponentSection.create(c)
.component(MyComponent.create(c).build())
.isFullSpan(true)
.build();
com.facebook.litho.sections.common.SingleComponentSectionSpec| Modifier and Type | Class and Description |
|---|---|
static class |
SingleComponentSection.Builder |
| 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 |
boolean |
isDiffSectionSpec() |
boolean |
isEquivalentTo(Section other)
Compares this section to a different one to check if they are the same
|
SingleComponentSection |
makeShallowCopy(boolean deepCopy) |
generateUniqueGlobalKeyForChild, getChildren, getEventDispatcher, getGlobalKey, getHandle, getKey, getLogTag, getParent, getScopedContext, getSimpleName, getStateContainer, makeShallowCopy, recordEventTrigger, setChildren, setCount, setGlobalKey, setKey, setScopedContextacceptTriggerEvent, bindService, createChildren, createInitialState, createService, dataBound, dataRendered, dispatchLoadingEvent, dispatchOnEvent, getEventTrigger, getEventTrigger, getLoadingEventHandler, getService, getTreePropsForChildren, isSectionIndexValid, newEventHandler, newEventHandler, newEventTrigger, populateTreeProps, refresh, requestFocus, requestFocus, requestFocus, requestFocusWithOffset, requestFocusWithOffset, requestFocusWithOffset, requestSmoothFocus, requestSmoothFocus, requestSmoothFocus, shouldUpdate, transferService, transferState, unbindService, viewportChangedpublic boolean isEquivalentTo(Section other)
SectionThis 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 interface Equivalence<Section>isEquivalentTo in class Sectionother - the component to compare topublic SingleComponentSection makeShallowCopy(boolean deepCopy)
makeShallowCopy in class SectionSection. 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)
SectionLifecycleDiffSectionSpec method annotated with OnDiffgenerateChangeSet in class SectionLifecyclepublic boolean isDiffSectionSpec()
isDiffSectionSpec in class SectionLifecycle