ui / winkit.android.ui / LinkTextView
LinkTextView
class LinkTextView : TextView
A Utility View With the ability to show the links that are provided in the String
Parameters
context -
attrs -
Constructors
| Name | Summary |
|---|---|
| <init> | LinkTextView(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)gets the required parameters and initializes a new @LinkTextView |
Properties
| Name | Summary |
|---|---|
| linkColor | var linkColor: Int |
| linkUnderline | var linkUnderline: Boolean |
| onLinkClick | var onLinkClick: (url: String) -> Unit |
Functions
| Name | Summary |
|---|---|
| setHtml | fun setHtml(html: String): UnitThis is the method which provides the feature to pass links via HTML and sends them to the default setText method |
| setText | fun setText(text: CharSequence?, type: BufferType): Unit |
Extension Functions
| Name | Summary |
|---|---|
| measure | fun View.measure(callback: (width: Int, height: Int) -> Unit): UnitCalculate the view sizes adding the a ViewTreeObserver.OnGlobalLayoutListener and removing it after the first occurrence. |
| measureIfNeeded | fun View.measureIfNeeded(callback: (width: Int, height: Int) -> Unit): UnitCall the callback if the view is already measured passing the view’s sizes, otherwise call the measure method. |