Add isUnderlineText attribute
This commit is contained in:
parent
1a8b57de88
commit
a39ec54e52
|
|
@ -26,11 +26,13 @@ class ActionTextView @JvmOverloads constructor(
|
|||
context.withStyledAttributes(attrs, R.styleable.ActionTextView, defStyleAttr, 0) {
|
||||
val actionText = getString(R.styleable.ActionTextView_actionText).orEmpty()
|
||||
val actionColor = getColor(R.styleable.ActionTextView_actionColor, currentTextColor)
|
||||
val isUnderlineText = getBoolean(R.styleable.ActionTextView_isUnderlineText, false)
|
||||
|
||||
text = text.toClickableSubstringText(
|
||||
substring = actionText,
|
||||
clickAction = { onClickAction.invoke() },
|
||||
color = actionColor
|
||||
color = actionColor,
|
||||
isUnderlineText = isUnderlineText
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@
|
|||
<declare-styleable name="ActionTextView">
|
||||
<attr name="actionText" format="string"/>
|
||||
<attr name="actionColor" format="color"/>
|
||||
<attr name="isUnderlineText" format="boolean"/>
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in New Issue