-
- All Implemented Interfaces:
-
android.os.Parcelable,android.text.ParcelableSpan,android.text.style.UpdateAppearance,android.text.style.UpdateLayout,io.element.android.wysiwyg.view.spans.PlainAtRoomMentionDisplaySpan
public final class InlineCodeSpan extends TypefaceSpan implements PlainAtRoomMentionDisplaySpan
Inline code (
some codein Markdown, <code> in HTML) Span that applies a monospaced font style.Note that this span does not apply a background style; it simply tells the TextView where to apply an inline background.
To display this span, either:
add io.element.android.wysiwyg.inlinebg.SpanBackgroundRenderer to your TextView, using io.element.android.wysiwyg.inlinebg.InlineBgHelper as a reference
See io.element.android.wysiwyg.inlinebg.SpanBackgroundRenderer, based on the official Google sample:
https://medium.com/androiddevelopers/drawing-a-rounded-corner-background-on-text-5a610a95af5
https://github.com/googlearchive/android-text/tree/996fdb65bbfbb786c3ca4e4e40b30509067201fc/RoundedBackground-Kotlin
-
-
Constructor Summary
Constructors Constructor Description InlineCodeSpan(Float relativeSizeProportion)
-
Method Summary
Modifier and Type Method Description UnitupdateMeasureState(TextPaint paint)UnitupdateDrawState(TextPaint ds)-
Methods inherited from class io.element.android.wysiwyg.view.spans.InlineCodeSpan
describeContents, getFamily, getSpanTypeId, getTypeface, toString, writeToParcel -
Methods inherited from class android.text.style.TypefaceSpan
getUnderlying -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
InlineCodeSpan
InlineCodeSpan(Float relativeSizeProportion)
-
-
Method Detail
-
updateMeasureState
Unit updateMeasureState(TextPaint paint)
-
updateDrawState
Unit updateDrawState(TextPaint ds)
-
-
-
-