PullHook

open class PullHook(content: String? = null, rich: Boolean = false, align: <Error class: unknown class>? = null, className: String? = null, init: PullHook.() -> Unit? = null)

A pull hook component supporting "Pull to refresh" functionality.

Parameters

content

the content of the component.

rich

whether content can contain HTML code

align

text align

className

CSS class names

init

an initializer extension function

Constructors

Link copied to clipboard
constructor(content: String? = null, rich: Boolean = false, align: <Error class: unknown class>? = null, className: String? = null, init: PullHook.() -> Unit? = null)

Creates a pull hook component.

Properties

Link copied to clipboard

Whether the component is disabled.

Link copied to clipboard

Whether the content of the page is not moving when pulling.

Link copied to clipboard

The current number of pixels the pull hook has moved.

Link copied to clipboard
var pullHeight: <Error class: unknown class>?

When pulled down further than this value it will switch to the "preaction" state.

Link copied to clipboard

The current state of the element.

Link copied to clipboard
var thresholdHeight: <Error class: unknown class>?

The component automatically switches to the "action" state when pulled further than this value.

Functions

Link copied to clipboard
open fun afterInsert(node: <Error class: unknown class>)
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun onAction(callback: (done: () -> Unit) -> Unit)

Sets action event listener.

Link copied to clipboard
open fun onActionClear()

Clears action event listener.

Link copied to clipboard
open fun onPull(callback: (ratio: Number) -> Unit)

Sets pull event listener.

Link copied to clipboard
open fun onPullClear()

Clears pull event listener.