ViewKt

public final class ViewKt


Summary

Public fields

final @NonNull Sequence<@NonNull View>

Returns a Sequence over this view and its descendants recursively.

final @NonNull Sequence<@NonNull ViewParent>

Returns a Sequence of the parent chain of this view by repeatedly calling View.getParent.

final boolean

Returns true when this view's visibility is View.GONE, false otherwise.

final boolean

Returns true when this view's visibility is View.INVISIBLE, false otherwise.

final boolean

Returns true when this view's visibility is View.VISIBLE, false otherwise.

final int

Returns the bottom margin if this view's LayoutParams is a ViewGroup.MarginLayoutParams, otherwise 0.

final int

Returns the end margin if this view's LayoutParams is a ViewGroup.MarginLayoutParams, otherwise 0.

final int

Returns the left margin if this view's LayoutParams is a ViewGroup.MarginLayoutParams, otherwise 0.

final int

Returns the right margin if this view's LayoutParams is a ViewGroup.MarginLayoutParams, otherwise 0.

final int

Returns the start margin if this view's LayoutParams is a ViewGroup.MarginLayoutParams, otherwise 0.

final int

Returns the top margin if this view's LayoutParams is a ViewGroup.MarginLayoutParams, otherwise 0.

Public methods

static final void
ViewKt.doOnAttach(View receiver, Function1<ViewUnit> action)

Performs the given action when this view is attached to a window.

static final void
ViewKt.doOnDetach(View receiver, Function1<ViewUnit> action)

Performs the given action when this view is detached from a window.

static final void
ViewKt.doOnLayout(View receiver, Function1<View