public class MountState extends java.lang.Object implements MountDelegateTarget
| Modifier and Type | Field and Description |
|---|---|
static long |
ROOT_HOST_ID |
| Constructor and Description |
|---|
MountState(Host rootHost) |
MountState(Host rootHost,
Systracer tracer)
This constructor allows the outer framework using RenderCore (e.g.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attach()
This is called when the
MountItems mounted on this MountState need to be
re-bound with the same RenderUnit. |
void |
detach()
Unbinds all the MountItems currently mounted on this MountState.
|
java.lang.Object |
getContentAt(int position) |
java.lang.Object |
getContentById(long id) |
java.util.ArrayList<Host> |
getHosts() |
MountDelegate |
getMountDelegate() |
MountItem |
getMountItemAt(int position) |
int |
getMountItemCount()
Returns the total number mount items currently mounted.
|
int |
getRenderUnitCount()
Returns the total number render units in the MountState; mounted and unmounted.
|
Host |
getRootHost() |
boolean |
isRootItem(int position) |
void |
mount(RenderTree renderTree)
Mount the layoutState on the pre-set HostView.
|
boolean |
needsRemount()
True if we have manually unmounted content (e.g.
|
void |
notifyMount(long id) |
void |
notifyUnmount(long id) |
ExtensionState |
registerMountExtension(MountExtension mountExtension)
Deprecated.
Only used for Litho's integration. Marked for removal.
|
void |
removeUnmountDelegateExtension() |
void |
setEnsureParentMounted(boolean ensureParentMounted) |
void |
setUnmountDelegateExtension(UnmountDelegateExtension unmountDelegateExtension) |
void |
unbindMountItem(MountItem mountItem) |
void |
unmountAllItems() |
void |
unregisterAllExtensions() |
public static final long ROOT_HOST_ID
public MountState(Host rootHost)
public void setEnsureParentMounted(boolean ensureParentMounted)
public boolean needsRemount()
needsRemount in interface MountDelegateTargetpublic void notifyMount(long id)
notifyMount in interface MountDelegateTargetpublic void notifyUnmount(long id)
notifyUnmount in interface MountDelegateTargetpublic void mount(RenderTree renderTree)
mount in interface MountDelegateTargetrenderTree - a new RenderTree to mountpublic void unmountAllItems()
unmountAllItems in interface MountDelegateTargetpublic boolean isRootItem(int position)
isRootItem in interface MountDelegateTargetpublic Host getRootHost()
getRootHost in interface MountDelegateTargetpublic java.lang.Object getContentAt(int position)
getContentAt in interface MountDelegateTargetpublic java.lang.Object getContentById(long id)
getContentById in interface MountDelegateTarget@Deprecated public ExtensionState registerMountExtension(MountExtension mountExtension)
registerMountExtension in interface MountDelegateTargetmountExtension - public java.util.ArrayList<Host> getHosts()
getHosts in interface MountDelegateTargetpublic MountItem getMountItemAt(int position)
getMountItemAt in interface MountDelegateTargetpublic int getMountItemCount()
MountDelegateTargetgetMountItemCount in interface MountDelegateTargetpublic int getRenderUnitCount()
MountDelegateTargetgetRenderUnitCount in interface MountDelegateTargetpublic void setUnmountDelegateExtension(UnmountDelegateExtension unmountDelegateExtension)
setUnmountDelegateExtension in interface MountDelegateTargetpublic void removeUnmountDelegateExtension()
removeUnmountDelegateExtension in interface MountDelegateTargetpublic MountDelegate getMountDelegate()
getMountDelegate in interface MountDelegateTargetpublic void attach()
MountItems mounted on this MountState need to be
re-bound with the same RenderUnit. This happens when a detach/attach happens on the root Host that owns the MountState.attach in interface MountDelegateTargetpublic void detach()
detach in interface MountDelegateTargetpublic void unbindMountItem(MountItem mountItem)
unbindMountItem in interface MountDelegateTargetpublic void unregisterAllExtensions()
unregisterAllExtensions in interface MountDelegateTarget