Binder

interface Binder<V : ViewGroup>

This binder class is used to asynchronously layout Components given a list of Component and attaching them to a ViewGroup through the bind(ViewGroup) method.

Inheritors

Properties

Link copied to clipboard

Return true if wrap content is enabled for the cross axis, false otherwise.

Link copied to clipboard

Return true if wrap content is enabled for the main axis, false otherwise.

Functions

Link copied to clipboard
abstract fun detach()

Detach items under the hood.

Link copied to clipboard
abstract fun getChildHeightSpec(index: Int): Int
Link copied to clipboard
abstract fun getChildWidthSpec(index: Int): Int
Link copied to clipboard
abstract fun getComponentAt(position: Int): ComponentTree?

Returns the component at the given position in the binder.

Link copied to clipboard
abstract fun measure(outSize: Size, widthSpec: Int, heightSpec: Int, reMeasureEventHandler: EventHandler<ReMeasureEvent>?)

Measure the content of this Binder. Call this method from the Component's onMeasure.

Link copied to clipboard
abstract fun mount(view: V)

Call this method before the View is mounted, i.e. within Component.onMount(ComponentContext, Object)

Link copied to clipboard
abstract fun setSize(width: Int, height: Int)

Set the width and height of the View that will be passed to the subsequent mount(ViewGroup), bind(ViewGroup) and unmount(ViewGroup) calls. Can be called by any thread.

Link copied to clipboard
abstract fun setViewportChangedListener(viewportChangedListener: ViewportInfo.ViewportChanged?)

Bind a ViewportInfo.ViewportChanged listener to this Binder. The listener will be notified of Viewport changes.

Link copied to clipboard
abstract fun unmount(view: V)

Call this method when the view is unmounted.