androidx.ui.viewinterop

Top-level functions summary

Unit
AndroidView(@LayoutRes resId: Int, modifier: Modifier = Modifier, postInflationCallback: (View) -> Unit = { _ -> })

Composes an Android View given a layout resource resId.

Unit
AndroidView(view: View, modifier: Modifier = Modifier)

Composes an Android View.

Top-level functions

AndroidView

@Composable fun AndroidView(
    @LayoutRes resId: Int,
    modifier: Modifier = Modifier,
    postInflationCallback: (View) -> Unit = { _ -> }
): Unit

Composes an Android View given a layout resource resId. The method handles the inflation of the View and will call the postInflationCallback after this happens. Note that the callback will always be invoked on the main thread.

Parameters
resId: Int The id of the layout resource to be inflated.
modifier: Modifier = Modifier The modifier to be applied to the layout.
postInflationCallback: (View) -> Unit = { _ -> } The callback to be invoked after the layout is inflated.

AndroidView

@Composable fun AndroidView(
    view: View,
    modifier: Modifier = Modifier
): Unit

Composes an Android View.

Parameters
view: View The View to compose.
modifier: Modifier = Modifier The Modifier to be applied to the view.