ViewGroupChildren

class ViewGroupChildren(container: ViewGroup, insert: (index: Int, widget: Widget<View>) -> Unit = { index, widget -> container.addView(widget.value, index) }, remove: (index: Int, count: Int) -> Unit = { index, count -> container.removeViews(index, count) }, onModifierUpdated: (index: Int, widget: Widget<View>) -> Unit = { _, _ -> container.requestLayout() }) : Widget.Children<View>

Constructors

Link copied to clipboard
constructor(container: ViewGroup, insert: (index: Int, widget: Widget<View>) -> Unit = { index, widget -> container.addView(widget.value, index) }, remove: (index: Int, count: Int) -> Unit = { index, count -> container.removeViews(index, count) }, onModifierUpdated: (index: Int, widget: Widget<View>) -> Unit = { _, _ -> container.requestLayout() })

Properties

Link copied to clipboard
open override val widgets: List<Widget<View>>

A view of current child widgets. This list will change its contents as the mutator functions below are invoked.

Functions

Link copied to clipboard
open override fun detach()

Clear widgets without triggering an update the displayed UI.

Link copied to clipboard
open override fun insert(index: Int, widget: Widget<View>)

Insert child widget at index.

Link copied to clipboard
open override fun move(fromIndex: Int, toIndex: Int, count: Int)

Move count child widgets from fromIndex to toIndex.

Link copied to clipboard
open override fun onModifierUpdated(index: Int, widget: Widget<View>)

Indicates that Modifiers for the child widgets have changed.

Link copied to clipboard
open override fun remove(index: Int, count: Int)

Remove count child widgets starting from index.