AlignImageSpan

open class AlignImageSpan : ImageSpan

支持垂直居中的ImageSpan

Author

cginechen

Constructors

AlignImageSpan
Link copied to clipboard
open fun AlignImageSpan(d: Drawable, verticalAlignment: Int)
作为 span 的 Drawable
AlignImageSpan
Link copied to clipboard
open fun AlignImageSpan(d: Drawable, verticalAlignment: Int, fontWidthMultiple: Float)
作为 span 的 Drawable

Functions

draw
Link copied to clipboard
open fun draw(canvas: Canvas, text: CharSequence, start: Int, end: Int, x: Float, top: Int, y: Int, bottom: Int, paint: Paint)
getSize
Link copied to clipboard
open fun getSize(paint: Paint, text: CharSequence, start: Int, end: Int, fm: Paint.FontMetricsInt): Int
setAvoidSuperChangeFontMetrics
Link copied to clipboard
open fun setAvoidSuperChangeFontMetrics(avoidSuperChangeFontMetrics: Boolean)
是否避免父类修改FontMetrics,如果为 false 则会走父类的逻辑, 会导致FontMetrics被更改

Properties

ALIGN_MIDDLE
Link copied to clipboard
val ALIGN_MIDDLE: Int

Inheritors

MarginImageSpan
Link copied to clipboard