Function

addView

addView

Source set: Android
override fun addView(child: View?) = addView(child, -1)

addView

Source set: Android
override fun addView(child: View?, index: Int) =
        addView(child, index, child!!.layoutParams ?: generateDefaultLayoutParams())

addView

Source set: Android
override fun addView(child: View?, width: Int, height: Int) =
        addView(
            child,
            -1,
            generateDefaultLayoutParams().also {
                it.width = width
                it.height = height
            },
        )

addView

Source set: Android
override fun addView(child: View?, params: LayoutParams?) = addView(child, -1, params)

addView

Source set: Android
override fun addView(child: View?, index: Int, params: LayoutParams?)

Directly adding real Views to this view is not supported for external consumers, so we can use the non-layout-invalidating addViewInLayout for when we need to add utility container views, such as viewLayersContainer.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: