use of jp.sblo.pandora.jota.text.style.AlignmentSpan in project Jota-Text-Editor-old by jiro-aqua.
the class Layout method getParagraphAlignment.
/**
* Get the alignment of the specified paragraph, taking into account
* markup attached to it.
*/
public final Alignment getParagraphAlignment(int line) {
Alignment align = mAlignment;
if (mSpannedText) {
Spanned sp = (Spanned) mText;
AlignmentSpan[] spans = sp.getSpans(getLineStart(line), getLineEnd(line), AlignmentSpan.class);
int spanLength = spans.length;
if (spanLength > 0) {
align = spans[spanLength - 1].getAlignment();
}
}
return align;
}
Aggregations