public class MountState extends Object implements MountDelegateTarget
Modifier and Type | Field and Description |
---|---|
static long |
ROOT_HOST_ID |
Constructor and Description |
---|
MountState(Host rootHost) |
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.
|
Object |
findMountContentById(long id) |
Object |
getContentAt(int position) |
Object |
getContentById(long id) |
int |
getContentCount() |
ArrayList<Host> |
getHosts() |
MountItem |
getMountItemAt(int position) |
int |
getMountItemCount() |
MountItem |
getRootItem() |
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(RenderTreeNode node,
int position) |
void |
notifyUnmount(int position) |
void |
registerMountDelegateExtension(MountExtension mountExtension)
Deprecated.
Only used for Litho's integration. Marked for removal.
|
void |
setUnmountDelegateExtension(UnmountDelegateExtension unmountDelegateExtension) |
void |
unbindMountItem(MountItem mountItem) |
void |
unmountAllItems() |
public static final long ROOT_HOST_ID
public MountState(Host rootHost)
public Object findMountContentById(long id)
public boolean needsRemount()
needsRemount
in interface MountDelegateTarget
public void notifyMount(RenderTreeNode node, int position)
notifyMount
in interface MountDelegateTarget
public void notifyUnmount(int position)
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 MountItem getRootItem()
getRootItem
in interface MountDelegateTarget
public Object getContentAt(int position)
getContentAt
in interface MountDelegateTarget
public Object getContentById(long id)
getContentById
in interface MountDelegateTarget
public int getContentCount()
getContentCount
in interface MountDelegateTarget
@Deprecated public void registerMountDelegateExtension(MountExtension mountExtension)
registerMountDelegateExtension
in interface MountDelegateTarget
public ArrayList<Host> getHosts()
getHosts
in interface MountDelegateTarget
public MountItem getMountItemAt(int position)
getMountItemAt
in interface MountDelegateTarget
public int getMountItemCount()
getMountItemCount
in interface MountDelegateTarget
public void setUnmountDelegateExtension(UnmountDelegateExtension unmountDelegateExtension)
setUnmountDelegateExtension
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