public final class DebugComponent
extends java.lang.Object
Component
or a ComponentLayout
. The purpose of this class is for tools such as Stetho's
UI inspector to be able to easily visualize a component hierarchy without worrying about
implementation details of Litho.Modifier and Type | Class and Description |
---|---|
static interface |
DebugComponent.Overrider |
public static DebugComponent getRootInstance(LithoView view)
public static DebugComponent getRootInstance(ComponentTree componentTree)
public static DebugComponent getInstance(LithoLayoutResult result)
public void setOverrider(DebugComponent.Overrider overrider)
public java.util.List<DebugComponent> getChildComponents()
View
s
that are mounted by this component as those are not components. Use this#getMountedView
for that.public View getMountedView()
public Drawable getMountedDrawable()
public LithoView getLithoView()
public Rect getBoundsInLithoView()
LithoView
.public Rect getBounds()
public Rect getBoundsInParentDebugComponent()
public boolean isSameNode(DebugComponent other)
public ComponentContext getContext()
ComponentContext
for this component.public boolean isLayoutNode()
public java.lang.String getTestKey()
public java.lang.String getComponentTestKey()
Unlike getTestKey()
, this function can return a test key set on any Component,
including container Components which resolve into LayoutNodes.
Unlike getTestKey()
, this function can also return test keys set on individual
Components even when they are all resolved into a single InternalNode.
public java.lang.Object getComponentTag()
getTestKey()
, this
will return tags for any Component, including Components which are not LayoutNodes.public java.lang.String getAllTextContent()
public java.lang.String getTextContent()
public ComponentHost getComponentHost()
ComponentHost
that wraps this component or null if one cannot be found.public java.lang.String getKey()
public Component getComponent()
public DebugLayoutNode getLayoutNode()
public void rerender()
public StateContainer getStateContainer()
public java.lang.String getGlobalKey()
public boolean canResolve()
public boolean isRoot()