|
@@ -64,12 +64,18 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
|
|
|
callBack = activity as CallBack
|
|
callBack = activity as CallBack
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 设置内容
|
|
|
|
|
+ */
|
|
|
fun setContent(textPage: TextPage) {
|
|
fun setContent(textPage: TextPage) {
|
|
|
this.textPage = textPage
|
|
this.textPage = textPage
|
|
|
imagePaint.isAntiAlias = AppConfig.useAntiAlias
|
|
imagePaint.isAntiAlias = AppConfig.useAntiAlias
|
|
|
invalidate()
|
|
invalidate()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 更新绘制区域
|
|
|
|
|
+ */
|
|
|
fun upVisibleRect() {
|
|
fun upVisibleRect() {
|
|
|
visibleRect.set(
|
|
visibleRect.set(
|
|
|
ChapterProvider.paddingLeft.toFloat(),
|
|
ChapterProvider.paddingLeft.toFloat(),
|