# Layout

@ Hikageable
fun Layout (@ LayoutRes resId: Int , lparams: Hikage.LayoutParams ? = null, id: String ? = null): View

Provide layout from resId.

#### Parameters

resId

the layout resource id.

lparams

the view layout params.

id

the view id, generated by default.

@ Hikageable
inline fun < VB : ViewBinding> Layout (lparams: Hikage.LayoutParams ? = null, id: String ? = null): VB

Provide layout from ViewBinding.

#### Return

VB

#### Parameters

lparams

the view layout params.

id

the view id, generated by default.

@ Hikageable
fun Layout (view: View , lparams: Hikage.LayoutParams ? = null, id: String ? = null): View

Provide layout from exists View.

#### Return

View

#### Parameters

view

the view instance.

lparams

the view layout params.

id

the view id, generated by default.

@ Hikageable
fun Layout (hikage: Hikage , lparams: Hikage.LayoutParams ? = null, id: String ? = null): Hikage

Provide layout from another Hikage.

- Note: Hikage view IDs will not copied to this layout when provides a complete Hikage instead of Delegate.

    val first: Hikage = Hikageable(context) {
        TextView(id = "textView")
    }
    val second: Hikage = Hikageable(context) {
        TextView(id = "textView")
        // The view ID "textView" will not copied to this layout,
        // so there will be no problem of ID overlap.
        Layout(first)
    }

Content copied to clipboard

#### Return

Hikage

#### Parameters

hikage

the hikage instance.

lparams

the view layout params.

id

the view id, generated by default.

@ Hikageable
fun Layout (delegate: Hikage.Delegate <*>, lparams: Hikage.LayoutParams ? = null, id: String ? = null, embedded: Boolean = true): Hikage

Provide layout from another Delegate.

- Note: If you use embedded, you must make sure that the introduced view IDs do not overlap with the view IDs in the current layout.

#### Return

Hikage

#### Parameters

delegate

the delegate instance.

lparams

the view layout params.

id

the view id, generated by default.

embedded

whether to embed this layout (All view IDs and performers will be copied), default is true.