public interface Node<RenderContext> extends Copyable
Modifier and Type | Interface and Description |
---|---|
static interface |
Node.LayoutResult<T>
Represents the result of a Layout pass.
|
Modifier and Type | Method and Description |
---|---|
Node.LayoutResult |
calculateLayout(RenderState.LayoutContext<RenderContext> context,
int widthSpec,
int heightSpec)
Implementations of Node are responsible to calculate a layout based on the width/height
constraints provided.
|
Copyable |
getLayoutParams()
Returns the layout params of this Node.
|
Node.LayoutResult calculateLayout(RenderState.LayoutContext<RenderContext> context, int widthSpec, int heightSpec)
context
- The LayoutContext associated with this layout calculation RenderState.LayoutContext
widthSpec
- a measure spec for the width in the format of View.MeasureSpec
heightSpec
- a measure spec for the height in the format of View.MeasureSpec
Copyable getLayoutParams()
Copyable
, and can be copied to be reused but another node.