pull/1901/head
kunfei 3 years ago
parent 2d2f27800e
commit 8cdd5b990b
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt

@ -98,7 +98,6 @@ class ReadView(context: Context, attrs: AttributeSet) :
addView(curPage) addView(curPage)
addView(prevPage) addView(prevPage)
if (!isInEditMode) { if (!isInEditMode) {
upBg()
setWillNotDraw(false) setWillNotDraw(false)
upPageAnim() upPageAnim()
} }
@ -121,6 +120,9 @@ class ReadView(context: Context, attrs: AttributeSet) :
setRect9x() setRect9x()
prevPage.x = -w.toFloat() prevPage.x = -w.toFloat()
pageDelegate?.setViewSize(w, h) pageDelegate?.setViewSize(w, h)
if (w > 0 && h > 0) {
upBg()
}
} }
override fun dispatchDraw(canvas: Canvas) { override fun dispatchDraw(canvas: Canvas) {

Loading…
Cancel
Save