private void setHeightIfNeed(CharSequence text, @IntRange(from = 0) int start, @IntRange(from = 0) int end, @Nullable Paint.FontMetricsInt fm) {
if (fm != null && text.length() == end - start) {
// Extending classes can set the height of the span by updating
// attributes of {@link android.graphics.Paint.FontMetricsInt}. If the span covers the whole
// text, and the height is not set,
// {@link #draw(Canvas, CharSequence, int, int, float, int, int, int, Paint)} will not be
// called for the span.
fm.top = mRect.top;
fm.bottom = mRect.bottom;
}
}
ItalicReplacementSpan.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:FastTextView
作者:
评论列表
文章目录