public final class Layout extends Object
ComponentLayout.Builder
from an existing Component
.
This is useful for components with child components as props.Modifier and Type | Method and Description |
---|---|
static ComponentLayout.Builder |
create(ComponentContext c,
Component<?> component)
Create a
ComponentLayout.Builder from an existing Component . |
static ComponentLayout.Builder |
create(ComponentContext c,
Component<?> component,
int defStyleAttr,
int defStyleRes)
Create a
ComponentLayout.Builder from an existing Component . |
public static ComponentLayout.Builder create(ComponentContext c, Component<?> component, @AttrRes int defStyleAttr, @StyleRes int defStyleRes)
ComponentLayout.Builder
from an existing Component
.c
- The context to create the layout withincomponent
- The component to render within this layoutdefStyleAttr
- The id of the attribute to use for default style attributesdefStyleRes
- The id of the style to use for layout attributespublic static ComponentLayout.Builder create(ComponentContext c, Component<?> component)
ComponentLayout.Builder
from an existing Component
.c
- The context to create the layout withincomponent
- The component to render within this layout