public final class DebugComponent extends 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(Component component)
DebugComponent
of a LithoView. This should be the start of your
traversal.public static DebugComponent getRootInstance(LithoView view)
public static DebugComponent getRootInstance(ComponentTree componentTree)
public static DebugComponent getRootInstance(InternalNode rootInternalNode)
public void setOverrider(DebugComponent.Overrider overrider)
public 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 boolean isSameNode(DebugComponent other)
public ComponentContext getContext()
ComponentContext
for this component.public boolean isLayoutNode()
public String getTestKey()
public String getAllTextContent()
public String getTextContent()
public ComponentHost getComponentHost()
ComponentHost
that wraps this component or null if one cannot be found.public String getKey()
public Component getComponent()
public DebugLayoutNode getLayoutNode()
public void rerender()
public StateContainer getStateContainer()
public String getGlobalKey()
public boolean canResolve()
public boolean isRoot()