UnderlineSpan
open class UnderlineSpan : CharacterStyle, ParcelableSpan, UpdateAppearance
A span that underlines the text it's attached to.
The span can be used like this:
<code>SpannableString string = new SpannableString("Text with underline span");
string.setSpan(new UnderlineSpan(), 10, 19, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);</code>
Underlined text.
Summary
Public methods |
open Int |
|
open Int |
|
open String |
|
open Unit |
|
open Unit |
Flatten this object in to a Parcel.
|
Inherited functions |
From class CharacterStyle
CharacterStyle! |
getUnderlying()
Returns "this" for most CharacterStyles, but for CharacterStyles that were generated by wrap , returns the underlying CharacterStyle.
|
CharacterStyle! |
wrap(cs: CharacterStyle!)
A given CharacterStyle can only applied to a single region of a given Spanned. If you need to attach the same CharacterStyle to multiple regions, you can use this method to wrap it with a new object that will have the same effect but be a distinct object so that it can also be attached without conflict.
|
|
Public constructors
UnderlineSpan
UnderlineSpan(src: Parcel)
Creates an UnderlineSpan
from a parcel.
Parameters |
src |
Parcel: This value cannot be null . |
Public methods
describeContents
open fun describeContents(): Int
getSpanTypeId
open fun getSpanTypeId(): Int
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
updateDrawState
open fun updateDrawState(ds: TextPaint): Unit
Parameters |
ds |
TextPaint: This value cannot be null . |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[]]