Package-level declarations

Types

Link copied to clipboard

Used as the listener parameter type for the onSubmit binding adapter.

Functions

Link copied to clipboard

Convert a LocalTime to a StringResolver. This can be used, for example, to populate a TextView with the time, so it can be used as a clock.

Link copied to clipboard
fun ViewAnimator.displayedChild(childIndex: Int?)

Sets which child view will be displayed if childIndex is not null. If childIndex is null, the call is ignored.

Link copied to clipboard

Set a listener which, if not null, will be called when a user executes an action indicating the editing is done. If listener is null, the previous set listener is cleared.

Link copied to clipboard
fun RatingBar.rating(rating: Float?)

Exposes the setter for RatingBar.setRating. If rating is null the rating is set to 0.0F.

Link copied to clipboard

If this ViewGroup has a ViewDataBinding associated with it, it will find it and return the associated LifecycleOwner. It will traverse its parents all through the view hierarchy searching for the first LifecycleOwner it encounters.

Link copied to clipboard
fun ImageView.setBackground(drawableResolver: DrawableResolver?)

Set a drawableResolver as the background image without manually resolving the value through the context.

Link copied to clipboard

Sets the vertical bias for the View inside a ConstraintLayout to the give bias, if bias is not null. If bias is null, the vertical bias constraint is restored to its initial value.

Link copied to clipboard
fun Spinner.setEntries(position: Int?, entries: List<*>?)

Pass a list of StringResolvers to the Spinner without manually resolving the values through the context. Entries in the list which are not StringResolvers will be passed without trying to resolve the value. Optionally allows to select an item of the Spinner at position.

Link copied to clipboard
fun ImageView.setForeground(drawableResolver: DrawableResolver?)

Set a drawableResolver as the foreground image without manually resolving the value through the context.

Link copied to clipboard
fun View.setIdTag(@IdRes tag: Int?)

Sets the tag of the View to the given tag ID reference.

Link copied to clipboard
fun View.setLayoutHeight(layoutHeightPx: Float?)

Sets the ViewGroup.LayoutParams.height of the View inside a ViewGroup to the given layoutHeightPx. The fractional part, if any, is rounded down towards zero. If layoutHeightPx is null, the layout height is set to 0.

fun View.setLayoutHeight(layoutHeightPx: Int?)

Sets the ViewGroup.LayoutParams.height of the View inside a ViewGroup to the given layoutHeightPx. If layoutHeightPx is null, the layout height is set to 0.

Link copied to clipboard

Sets the ViewGroup.MarginLayoutParams.bottomMargin of the View to the given margin. If margin is null, the bottom margin is set to 0.

Link copied to clipboard

Set the relative end margin of the View to the given margin, if margin is not null. If margin is null, the relate end margin of the view is not set.

Link copied to clipboard

Sets the ViewGroup.MarginLayoutParams.leftMargin and ViewGroup.MarginLayoutParams.rightMargin of the View to the given margin. If margin is null, the left and right margins are set to 0.

Link copied to clipboard

Sets the ViewGroup.MarginLayoutParams.leftMargin of the View to the given margin. If margin is null, the left margin is set to 0.

Link copied to clipboard

Sets the ViewGroup.MarginLayoutParams.rightMargin of the View to the given margin. If margin is null, the right margin is set to 0.

Link copied to clipboard

Set the relative start margin of the View to the given margin, if margin is not null. If margin is null, the relate start margin of the view is not set.

Link copied to clipboard

Sets the ViewGroup.MarginLayoutParams.topMargin of the View to the given margin. If margin is null, the top margin is set to 0.

Link copied to clipboard

Sets the ViewGroup.MarginLayoutParams.topMargin and ViewGroup.MarginLayoutParams.bottomMargin of the View to the given margin. If margin is null, the top and bottom margins are set to 0.

Link copied to clipboard
fun View.setLayoutWeight(layoutWeight: Float?)

Sets the LinearLayout.LayoutParams.weight for the View inside a LinearLayout to the given layoutWeight. If layoutWeight is null, the layout weight is set to 0.

Link copied to clipboard
fun View.setLayoutWidth(layoutWidthPx: Float?)

Sets the ViewGroup.LayoutParams.width of the View inside a ViewGroup to the given layoutWidthPx. The fractional part, if any, is rounded down towards zero. If layoutWidthPx is null, the layout width is set to 0.

fun View.setLayoutWidth(layoutWidthPx: Int?)

Sets the ViewGroup.LayoutParams.width of the View inside a ViewGroup to the given layoutWidthPx. If layoutWidthPx is null, the layout width is set to 0.

Link copied to clipboard
fun View.setPadding(paddingPx: Float?)

Sets the padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the padding is set to 0.

Link copied to clipboard
fun View.setPaddingBottom(paddingPx: Float?)

Sets the bottom padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the bottom padding is set to 0.

Link copied to clipboard
fun View.setPaddingEnd(paddingPx: Float?)

Sets the end padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the end padding is set to 0.

Link copied to clipboard

Sets the left and right padding of the View to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the left and right padding is set to 0.

Link copied to clipboard
fun View.setPaddingLeft(paddingPx: Float?)

Sets the left padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the left padding is set to 0.

Link copied to clipboard
fun View.setPaddingRight(paddingPx: Float?)

Sets the left padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the right padding is set to 0.

Link copied to clipboard
fun View.setPaddingStart(paddingPx: Float?)

Sets the start padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the start padding is set to 0.

Link copied to clipboard
fun View.setPaddingTop(paddingPx: Float?)

Sets the top padding of the View inside a ViewGroup to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the top padding is set to 0.

Link copied to clipboard
fun View.setPaddingVertical(paddingPx: Float?)

Sets the top and bottom padding of the View to the given paddingPx. The fractional part, if any, is rounded down towards zero. If paddingPx is null, the top and bottom padding is set to 0.

Link copied to clipboard

Changes the selection state of the ImageView to selected. If selected is null the selection state is set to false.

Link copied to clipboard
fun ImageView.setSrc(drawableResolver: DrawableResolver?)

Set a drawableResolver as the source image without manually resolving the value through the context.

Link copied to clipboard

Inflates and sets the state list animator resource AnimatorRes to the View, if AnimatorRes is not null. The AnimatorRes is inflated with the AnimatorInflater. If AnimatorRes is null, the previous state list animator, if any, is detached from the view.

Link copied to clipboard
fun TextView.setText(stringResolver: StringResolver?)

Set a StringResolver as the text without manually resolving the value through the context.

Link copied to clipboard

Set the color filter of the image to a color, if not null. If color is null, any previous set color filter is cleared.

Link copied to clipboard
fun ViewGroup.setTouchDelegateView(delegateChildView: View?)

Sets a TouchDelegate to forward all the touch events received by this ViewGroup to delegateChildView. The delegateChildView view should be a child of this ViewGroup. If delegateChildView is null, the set TouchDelegate is cleared.

Link copied to clipboard
fun View.setVisibleIf(condition: Boolean?)

Sets the visibility of the View based on whether the condition is satisfied. If the condition is satisfied (true), the visibility is set to View.VISIBLE. Otherwise, it is set to View.GONE. If condition is null, it is set to View.GONE.

Link copied to clipboard
fun View.setVisibleIfNot(condition: Boolean?)

Sets the visibility of the View based on whether the condition is satisfied. If the condition is unsatisfied (false) or null, the visibility is set to View.VISIBLE. Otherwise, it is set to View.GONE.

Link copied to clipboard
fun View.setVisibleIfNotNull(instance: Any?)

Sets the visibility of the View based on whether the instance is null. If the instance is null, the visibility is set to View.VISIBLE. If the instance is null, it is set to View.GONE.

Link copied to clipboard
fun View.setVisibleIfNull(instance: Any?)

Sets the visibility of the View based on whether the instance is null. If the instance is null, the visibility is set to View.VISIBLE. If the instance is not null, it is set to View.GONE.