# lazyHikage

fun Context . lazyHikage (builder: HikageBuilder , parent: ViewGroup ? = null, attachToParent: Boolean = parent != null): <Error class: unknown class>

Lazy initialize a Hikage layout.

Usage:

    object MainLayout : HikageBuilder {

       override fun build() = Hikageable {
           LinearLayout(
               lparams = LayoutParams(matchParent = true),
               init = {
                   orientation = LinearLayout.VERTICAL
                   gravity = Gravity.CENTER
               }
          ) {
               TextView {
                   text = "Hello, Hikage!"
                   textSize = 20f
               }
          }
       }
    }

    class MainActivity : AppCompatActivity() {

        private val hikage by lazyHikage(MainLayout)

        override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            setContentView(hikage)
        }
    }

Content copied to clipboard

#### Receiver

the context to create the layout.

#### Return

Lazy<Hikage>

#### Parameters

builder

the HikageBuilder instance.

parent

the parent view group.

attachToParent

whether to attach the layout to the parent when the parent is filled.