ArComposeView

class ArComposeView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : BasePolygonView

A android.view.View that can host Jetpack Compose UI content. Use setContent to supply the content composable function for the view.

By default, the composition is disposed according to ViewCompositionStrategy.Default. Call disposeComposition to dispose of the underlying composition earlier, or if the view is never initially attached to a window. (The requirement to dispose of the composition explicitly in the event that the view is never (re)attached is temporary.)

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Functions

Link copied to clipboard
open fun Content()
Link copied to clipboard
fun setContent(content: () -> Unit)

Set the Jetpack Compose UI content for this view. Initial composition will occur when the view becomes attached to a window or when createComposition is called, whichever comes first.