@ThreadSafe 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 |
Constructor and Description |
---|
ComponentTreeHolder() |
Modifier and Type | Method and Description |
---|---|
void |
acquireStateAndReleaseTree() |
void |
computeLayoutAsync(ComponentContext context,
int widthSpec,
int heightSpec) |
void |
computeLayoutSync(ComponentContext context,
int widthSpec,
int heightSpec,
Size size) |
static ComponentTreeHolder.Builder |
create() |
ComponentTree |
getComponentTree() |
RenderInfo |
getRenderInfo() |
boolean |
hasCompletedLatestLayout() |
boolean |
isInserted() |
boolean |
isReleased() |
boolean |
isTreeValid() |
void |
release() |
void |
setInserted(boolean inserted)
Set whether this ComponentTreeHolder has been inserted into the adapter.
|
void |
setRenderInfo(RenderInfo renderInfo) |
void |
updateLayoutHandler(LayoutHandler layoutHandler) |
public static ComponentTreeHolder.Builder create()
public void acquireStateAndReleaseTree()
public void computeLayoutSync(ComponentContext context, int widthSpec, int heightSpec, Size size)
public void computeLayoutAsync(ComponentContext context, int widthSpec, int heightSpec)
public RenderInfo getRenderInfo()
public boolean isTreeValid()
@Nullable public ComponentTree getComponentTree()
public void setRenderInfo(RenderInfo renderInfo)
public void updateLayoutHandler(@Nullable LayoutHandler layoutHandler)
public boolean hasCompletedLatestLayout()
public boolean isInserted()
public void setInserted(boolean inserted)
public boolean isReleased()
public void release()