Package icyllis.modernui.text.style
Class UnderlineSpan
java.lang.Object
icyllis.modernui.text.style.CharacterStyle
icyllis.modernui.text.style.UnderlineSpan
- All Implemented Interfaces:
ParcelableSpan
,UpdateAppearance
,Parcelable
A span that underlines the text it's attached to.
The span can be used like this:
SpannableString string = new SpannableString("Text with underline span");
string.setSpan(new UnderlineSpan(), 10, 19, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
-
Nested Class Summary
Nested classes/interfaces inherited from interface icyllis.modernui.util.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>, Parcelable.WriteFlags
-
Constructor Summary
ConstructorDescriptionCreates anUnderlineSpan
.UnderlineSpan
(Parcel src) Creates anUnderlineSpan
from a parcel. -
Method Summary
Modifier and TypeMethodDescriptionint
Return a special type identifier for this span class.void
updateDrawState
(TextPaint paint) void
writeToParcel
(Parcel dest, int flags) The subclass implements the method to flatten its contents by calling the methods ofParcel
for its primitive values.Methods inherited from class icyllis.modernui.text.style.CharacterStyle
getUnderlying, wrap
-
Constructor Details
-
UnderlineSpan
public UnderlineSpan()Creates anUnderlineSpan
. -
UnderlineSpan
Creates anUnderlineSpan
from a parcel.
-
-
Method Details
-
getSpanTypeId
public int getSpanTypeId()Description copied from interface:ParcelableSpan
Return a special type identifier for this span class.- Specified by:
getSpanTypeId
in interfaceParcelableSpan
-
writeToParcel
Description copied from interface:Parcelable
The subclass implements the method to flatten its contents by calling the methods ofParcel
for its primitive values.- Specified by:
writeToParcel
in interfaceParcelable
- Parameters:
dest
- the parcel to write the object's data toflags
- the flags about how the object should be written
-
updateDrawState
- Specified by:
updateDrawState
in classCharacterStyle
-