Added in API level 1
MaskFilterSpan
open class MaskFilterSpan : CharacterStyle, UpdateAppearance
kotlin.Any | ||
↳ | android.text.style.CharacterStyle | |
↳ | android.text.style.MaskFilterSpan |
Span that allows setting a MaskFilter
to the text it's attached to.
For example, to blur a text, a android.graphics.BlurMaskFilter
can be used:
MaskFilter blurMask = new BlurMaskFilter(5f, BlurMaskFilter.Blur.NORMAL); SpannableString string = new SpannableString("Text with blur mask"); string.setSpan(new MaskFilterSpan(blurMask), 10, 15, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);Text blurred with the
MaskFilterSpan
.
Summary
Public constructors | |
---|---|
MaskFilterSpan(filter: MaskFilter!) Creates a |
Public methods | |
---|---|
open MaskFilter! |
Return the mask filter for this span. |
open String |
toString() |
open Unit |
updateDrawState(ds: TextPaint!) |
Inherited functions | |
---|---|
Public constructors
MaskFilterSpan
Added in API level 1
MaskFilterSpan(filter: MaskFilter!)
Creates a MaskFilterSpan
from a MaskFilter
.
Parameters | |
---|---|
filter |
MaskFilter!: the filter to be applied to the TextPaint |
Public methods
getMaskFilter
Added in API level 1
open fun getMaskFilter(): MaskFilter!
Return the mask filter for this span.
Return | |
---|---|
MaskFilter! |
the mask filter for this span |
toString
Added in API level 1
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |