AndroidOverlay

Interface implemented by a rendering class to allow it to drive an Android UI via an appropriate OverlayDialogFactory implementation.

Note that you can mix this interface with others:

For example:

data class MyModal(
  override val content: C
) : ScreenOverlay, ModalOverlay, AndroidOverlay> {
  override val dialogFactory = OverlayDialogFactory> { r, e, c ->
    AppCompatDialog(c).setContent(r, e)
  }

  override fun  map(transform: (C) -> D) = MyModal(transform(content))
}

This is the simplest way to introduce a Dialog workflow driven UI, but using it requires your workflows code to reside in Android modules, instead of pure Kotlin. If this is a problem, or you need more flexibility for any other reason, you can use ViewRegistry to bind your renderings to OverlayDialogFactory implementations at runtime. Also note that a ViewRegistry entry will override the dialogFactory returned by an AndroidOverlay.

See also

Properties

Link copied to clipboard