Package-level declarations

Types

Link copied to clipboard
class BorderEdge(@ColorInt val color: Int? = null, val width: Dimen? = null)

Stores properties that are used to customise border edges

Link copied to clipboard
class BorderRadius(val all: Dimen? = null, val topLeft: Dimen? = null, val topRight: Dimen? = null, val bottomLeft: Dimen? = null, val bottomRight: Dimen? = null)

Stores properties that are used to customise the border radii

Link copied to clipboard
class HorizontalDivider(@ColorInt color: Int = Color.GRAY, thickness: Dimen = 1.dp, style: Style = Style) : KComponent

A horizontal divider that expands along its width while preserving its thickness.

Link copied to clipboard
class VerticalDivider(@ColorInt color: Int = Color.GRAY, thickness: Dimen = 1.dp, style: Style = Style) : KComponent

A vertical divider that expands along its height while preserving its thickness.

Functions

Link copied to clipboard
fun ResourcesScope.Border(edgeAll: BorderEdge? = null, edgeHorizontal: BorderEdge? = null, edgeVertical: BorderEdge? = null, edgeStart: BorderEdge? = null, edgeEnd: BorderEdge? = null, edgeTop: BorderEdge? = null, edgeBottom: BorderEdge? = null, edgeLeft: BorderEdge? = null, edgeRight: BorderEdge? = null, radius: BorderRadius? = null, effect: BorderEffect? = null): Border

Creates a border style to be applied to a component

Link copied to clipboard
fun ResourcesScope.Card(style: Style = Style, @ColorInt cardBackgroundColor: Int = Color.WHITE, cornerRadius: Dimen = 2.dp, elevation: Dimen = 2.dp, @ColorInt clippingColor: Int = Integer.MIN_VALUE, @ColorInt shadowStartColor: Int = 922746880, @ColorInt shadowEndColor: Int = 50331648, shadowBottomOverride: Dimen? = null, disableClipTopLeft: Boolean = false, disableClipTopRight: Boolean = false, disableClipBottomLeft: Boolean = false, disableClipBottomRight: Boolean = false, transparencyEnabled: Boolean = false, child: ResourcesScope.() -> Component): Component

Builder function for creating Card components.

Link copied to clipboard
fun ResourcesScope.HorizontalScroll(initialScrollPosition: Dimen = HorizontalScrollPrimitive.LAST_SCROLL_POSITION_UNSET.dp, scrollbarEnabled: Boolean = true, wrapContent: Boolean = false, fillViewport: Boolean = false, eventsController: HorizontalScrollEventsController? = null, onScrollChange: (View, scrollX: Int, oldScrollX: Int) -> Unit? = null, horizontalFadingEdgeEnabled: Boolean = false, incrementalMountEnabled: Boolean = false, overScrollMode: Int = View.OVER_SCROLL_IF_CONTENT_SCROLLS, scrollStateListener: ScrollStateListener? = null, fadingEdgeLength: Int = 0, style: Style = Style, child: ResourcesScope.() -> Component): Component

Builder function for creating HorizontalScrollPrimitive components.

Link copied to clipboard
fun ResourcesScope.Image(drawable: Drawable, style: Style = Style, scaleType: ImageView.ScaleType = ScaleType.FIT_CENTER, useIntrinsicSize: Boolean = true): Component

Builder function for creating Image components.

Link copied to clipboard
fun ResourcesScope.Progress(@ColorInt color: Int? = null, style: Style = Style, indeterminateDrawable: Drawable? = null): ProgressPrimitiveComponent

Builder function for creating ProgressPrimitiveComponent components.

Link copied to clipboard
fun ResourcesScope.Text(text: CharSequence?, style: Style = Style, @ColorInt textColor: Int = Color.BLACK, textSize: Dimen = 14.sp, textStyle: Int = NORMAL, typeface: Typeface? = DEFAULT, @ColorInt shadowColor: Int = Color.GRAY, shadowRadius: Dimen = 0.dp, shadowDx: Dimen = 0.dp, shadowDy: Dimen = 0.dp, alignment: TextAlignment? = null, breakStrategy: Int = TextStylesHelper.DEFAULT_BREAK_STRATEGY, verticalGravity: VerticalGravity = VerticalGravity.TOP, isSingleLine: Boolean = false, ellipsize: TextUtils.TruncateAt? = null, lineSpacingMultiplier: Float = 1.0f, lineHeight: Dimen? = null, extraSpacing: Dimen? = null, letterSpacing: Float = 0.0f, minLines: Int = 0, maxLines: Int = Int.MAX_VALUE, includeFontPadding: Boolean = true, accessibleClickableSpans: Boolean = false, clipToBounds: Boolean = true, handle: Handle? = null, customEllipsisText: CharSequence? = null, @ColorInt backgroundColor: Int? = null, @ColorInt highlightColor: Int? = null, textDirection: TextDirectionHeuristicCompat? = null, @AttrRes defStyleAttr: Int = 0, @StyleRes defStyleRes: Int = 0, dynamicTextColor: DynamicValue<Int>? = null, testKey: String? = null, minimallyWide: Boolean = false, @ColorInt outlineColor: Int? = null, outlineWidth: Dimen = 0.dp, touchableSpanListener: TouchableSpanListener? = null, spanListener: ClickableSpanListener? = null, clickableSpanExpandedOffset: Dimen = 0.dp): Text

Temporary builder function for creating TextSpec components. In the future it will either be auto-generated or modified to have the final set of parameters.

Link copied to clipboard
fun ResourcesScope.TextInput(initialText: CharSequence, style: Style = Style, hint: CharSequence = "", @ColorInt textColor: Int = Color.BLACK, @ColorInt hintTextColor: Int = Color.LTGRAY, textSize: Dimen = 14.sp, typeface: Typeface = Typeface.DEFAULT, textAlignment: Int = View.TEXT_ALIGNMENT_GRAVITY, gravity: Int = Gravity.CENTER_VERTICAL or Gravity.START, editable: Boolean = true, multiline: Boolean = false, minLines: Int = 1, maxLines: Int = Int.MAX_VALUE, inputType: Int = EditorInfo.TYPE_CLASS_TEXT, rawInputType: Int = EditorInfo.TYPE_NULL, imeOptions: Int = EditorInfo.IME_NULL, inputFilter: InputFilter? = null, inputFilters: List<InputFilter>? = null, ellipsize: TextUtils.TruncateAt? = null, onTextChanged: (TextChangedEvent) -> Unit? = null, onSelectionChanged: (SelectionChangedEvent) -> Unit? = null, onInputFocusChanged: (InputFocusChangedEvent) -> Unit? = null, onKeyUp: (KeyUpEvent) -> Boolean? = null, onKeyPreIme: (KeyPreImeEvent) -> Boolean? = null, onEditorAction: (EditorActionEvent) -> Boolean? = null, onInputConnection: (InputConnectionEvent) -> InputConnection? = null, handle: Handle? = null, inputBackground: Drawable? = null, textWatcher: TextWatcher? = null, shouldExcludeFromIncrementalMount: Boolean = false): TextInput

Builder function for creating TextInputSpec components.

Link copied to clipboard
fun ResourcesScope.VerticalScroll(initialScrollPosition: Dimen = 0.dp, scrollbarEnabled: Boolean = false, scrollbarFadingEnabled: Boolean = true, verticalFadingEdgeEnabled: Boolean = false, nestedScrollingEnabled: Boolean = false, fadingEdgeLength: Dimen = 0.dp, @ColorInt fadingEdgeColor: Int? = null, fillViewport: Boolean = false, overScrollMode: Int = View.OVER_SCROLL_IF_CONTENT_SCROLLS, eventsController: VerticalScrollEventsController? = null, incrementalMountEnabled: Boolean = true, onScrollChange: (NestedScrollView, scrollY: Int, oldScrollY: Int) -> Unit? = null, onScrollStateChange: (View, Int) -> Unit? = null, onInterceptTouch: (NestedScrollView, event: MotionEvent) -> Boolean? = null, style: Style = Style, child: ResourcesScope.() -> Component): Component

Builder function for creating Vertical Scroll Primitive.