Package-level declarations

Properties

Link copied to clipboard

Functions

Link copied to clipboard
inline fun Style.onBind(func: BindFunc<Any>): Style

inline fun Style.onBind(vararg deps: Any?, func: BindFunc<Any>): Style

This Style adds a mount callbacks. The BindFunc is invoked when the Component is mounted, and it receives a BindScope and the content this Component rendered to which can be a View or Drawable. The BindFunc must return an UnbindFunc and it must undo any mutations made to the View in the BindFunc. This API can be used to create higher-order Styles.

Link copied to clipboard
inline fun Style.onBindView(func: BindFunc<View>): Style

inline fun Style.onBindView(vararg deps: Any?, func: BindFunc<View>): Style

Note: Please use onBindViewWithDescription instead.

Link copied to clipboard
inline fun Style.onBindViewWithDescription(name: String, func: BindFunc<View>): Style

inline fun Style.onBindViewWithDescription(noinline description: () -> String, vararg deps: Any?, func: BindFunc<View>): Style

Use this Style instead of onBind to force the binder to be applied on a View; for example if a binder needs to be set on a Row or Column component, or if the binder needs to set common view properties even for components that render a Drawable.

Link copied to clipboard
inline fun Style.onBindWithDescription(name: String, func: BindFunc<Any>): Style

inline fun Style.onBindWithDescription(noinline description: () -> String, vararg deps: Any?, func: BindFunc<Any>): Style

This Style adds a mount callbacks. The BindFunc is invoked when the Component is mounted, and it receives a BindScope and the content this Component rendered to which can be a View or Drawable. The BindFunc must return an UnbindFunc and it must undo any mutations made to the View in the BindFunc. This API can be used to create higher-order Styles.

Link copied to clipboard
inline fun <BindDataT : Any> Style.viewBinder(binder: RenderUnit.Binder<Unit, View, BindDataT>): Style

An overload of Style.viewBinder which takes a RenderUnit.Binder that does not require a model.

fun Style.viewBinder(binder: RenderUnit.DelegateBinder<*, View, Any>): Style

inline fun <ModelT, BindDataT : Any> Style.viewBinder(binder: RenderUnit.Binder<ModelT, View, BindDataT>, model: ModelT): Style

Creates a Style which will apply the given RenderUnit.Binder to the View rendered by the Component the Style is added to. This abstraction can be used to create higher-level Styles which can apply some property generically to any type of Component.