TextSpec

@MountSpec(isPureRender = true, poolSize = 30, canPreallocate = true, events = [TextOffsetOnTouchEvent::class])
open class TextSpec

Component to render text. See text-widget for more details.

Example Text usage:


final SpannableStringBuilder spannable = new SpannableStringBuilder();
spannable.setSpan(new StyleSpan(Typeface.BOLD), start, end, Spannable.SPAN_INCLUSIVE_INCLUSIVE);

Text.create(c)
   .text(spannable) // String can be used
   .textSizeDip(20)
   .maxLines(3)
   .ellipsize(TextUtils.TruncateAt.END)
   .textColor(Color.BLACK)
   .build()

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
val UNSET: Int = -1

Functions

Link copied to clipboard
Link copied to clipboard
open fun resolveWidth(widthSpec: Int, layout: Layout, minimallyWide: Boolean, minimallyWideThreshold: Int): Int