public class ComponentTreeHolder extends Object
RecyclerBinder
. For each item the
ComponentTreeHolder keeps the RenderInfo
which contains the original Component
and either the ComponentTree
or the StateHandler
depending upon whether the item
is within the current working range or not.Modifier and Type | Class and Description |
---|---|
static class |
ComponentTreeHolder.Builder |
static interface |
ComponentTreeHolder.RenderState |
Modifier and Type | Field and Description |
---|---|
static String |
ACQUIRE_STATE_HANDLER_ON_RELEASE |
static String |
PREVENT_RELEASE_TAG |
Modifier and Type | Method and Description |
---|---|
void |
acquireStateAndReleaseTree(boolean acquireStateHandlerOnRelease) |
void |
addMeasureListener(ComponentTree.MeasureListener measureListener) |
void |
clearMeasureListener(ComponentTree.MeasureListener measureListener) |
void |
computeLayoutAsync(ComponentContext context,
int widthSpec,
int heightSpec) |
void |
computeLayoutAsync(ComponentContext context,
int widthSpec,
int heightSpec,
ComponentTree.MeasureListener measureListener) |
void |
computeLayoutSync(ComponentContext context,
int widthSpec,
int heightSpec,
Size size) |
static ComponentTreeHolder.Builder |
create() |
ComponentTree |
getComponentTree() |
RenderInfo |
getRenderInfo() |
boolean |
hasCompletedLatestLayout() |
boolean |
isInserted() |
boolean |
isTreeValid() |
boolean |
isTreeValidForSizeSpecs(int widthSpec,
int heightSpec) |
void |
releaseTree() |
void |
setInserted(boolean inserted)
Set whether this ComponentTreeHolder has been inserted into the adapter.
|
void |
setRenderInfo(RenderInfo renderInfo) |
void |
updateLayoutHandler(LithoHandler layoutHandler) |
public static final String PREVENT_RELEASE_TAG
public static final String ACQUIRE_STATE_HANDLER_ON_RELEASE
public static ComponentTreeHolder.Builder create()
public void acquireStateAndReleaseTree(boolean acquireStateHandlerOnRelease)
public void computeLayoutSync(ComponentContext context, int widthSpec, int heightSpec, Size size)
public void computeLayoutAsync(ComponentContext context, int widthSpec, int heightSpec)
public void computeLayoutAsync(ComponentContext context, int widthSpec, int heightSpec, ComponentTree.MeasureListener measureListener)
public void addMeasureListener(ComponentTree.MeasureListener measureListener)
public void clearMeasureListener(ComponentTree.MeasureListener measureListener)
public RenderInfo getRenderInfo()
public boolean isTreeValid()
public boolean isTreeValidForSizeSpecs(int widthSpec, int heightSpec)
public ComponentTree getComponentTree()
public void setRenderInfo(RenderInfo renderInfo)
public void updateLayoutHandler(LithoHandler layoutHandler)
public boolean hasCompletedLatestLayout()
public boolean isInserted()
public void setInserted(boolean inserted)
public void releaseTree()