-
- All Implemented Interfaces:
-
android.text.style.LeadingMarginSpan,android.text.style.LineHeightSpan,android.text.style.ParagraphStyle,android.text.style.UpdateAppearance,android.text.style.UpdateLayout,android.text.style.WrapTogetherSpan,io.element.android.wysiwyg.view.spans.BlockSpan,io.element.android.wysiwyg.view.spans.PlainAtRoomMentionDisplaySpan
public final class CodeBlockSpan extends MetricAffectingSpan implements BlockSpan, LeadingMarginSpan, LineHeightSpan, UpdateAppearance, PlainAtRoomMentionDisplaySpan
Code block (
``some code``in Markdown, <pre> in HTML) Span that applies a monospaced font style and adds an extra padding to the top and bottom of the paragraph.
-
-
Constructor Summary
Constructors Constructor Description CodeBlockSpan(Integer leadingMargin, Integer verticalPadding, Float relativeSizeProportion)
-
Method Summary
Modifier and Type Method Description UnitupdateDrawState(TextPaint tp)UnitupdateMeasureState(TextPaint textPaint)IntegergetLeadingMargin(Boolean first)UnitchooseHeight(CharSequence text, Integer start, Integer end, Integer spanStart, Integer lineHeight, Paint.FontMetricsInt fm)UnitdrawLeadingMargin(Canvas c, Paint p, Integer x, Integer dir, Integer top, Integer baseline, Integer bottom, CharSequence text, Integer start, Integer end, Boolean first, Layout layout)-
-
Method Detail
-
updateDrawState
Unit updateDrawState(TextPaint tp)
-
updateMeasureState
Unit updateMeasureState(TextPaint textPaint)
-
getLeadingMargin
Integer getLeadingMargin(Boolean first)
-
chooseHeight
Unit chooseHeight(CharSequence text, Integer start, Integer end, Integer spanStart, Integer lineHeight, Paint.FontMetricsInt fm)
-
-
-
-