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
MountItem s 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 MountDelegateTarget
public void notifyMount(long id)
notifyMount
in interface MountDelegateTarget
public void notifyUnmount(long id)
notifyUnmount
in interface MountDelegateTarget
public void mount(RenderTree renderTree)
mount
in interface MountDelegateTarget
renderTree
- a new RenderTree
to mountpublic void unmountAllItems()
unmountAllItems
in interface MountDelegateTarget
public boolean isRootItem(int position)
isRootItem
in interface MountDelegateTarget
public Host getRootHost()
getRootHost
in interface MountDelegateTarget
public java.lang.Object getContentAt(int position)
getContentAt
in interface MountDelegateTarget
public java.lang.Object getContentById(long id)
getContentById
in interface MountDelegateTarget
@Deprecated public ExtensionState registerMountExtension(MountExtension mountExtension)
registerMountExtension
in interface MountDelegateTarget
mountExtension
- public java.util.ArrayList<Host> getHosts()
getHosts
in interface MountDelegateTarget
public MountItem getMountItemAt(int position)
getMountItemAt
in interface MountDelegateTarget
public int getMountItemCount()
MountDelegateTarget
getMountItemCount
in interface MountDelegateTarget
public int getRenderUnitCount()
MountDelegateTarget
getRenderUnitCount
in interface MountDelegateTarget
public void setUnmountDelegateExtension(UnmountDelegateExtension unmountDelegateExtension)
setUnmountDelegateExtension
in interface MountDelegateTarget
public void removeUnmountDelegateExtension()
removeUnmountDelegateExtension
in interface MountDelegateTarget
public MountDelegate getMountDelegate()
getMountDelegate
in interface MountDelegateTarget
public void attach()
MountItem
s 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 MountDelegateTarget
public void detach()
detach
in interface MountDelegateTarget
public void unbindMountItem(MountItem mountItem)
unbindMountItem
in interface MountDelegateTarget
public void unregisterAllExtensions()
unregisterAllExtensions
in interface MountDelegateTarget