feat: 优化代码

pull/103/head
kunfei 5 years ago
parent 831f0a812d
commit b328a0590e
  1. 8
      app/src/main/java/io/legado/app/ui/book/read/page/delegate/SimulationPageDelegate.kt

@ -4,7 +4,6 @@ import android.graphics.*
import android.graphics.drawable.GradientDrawable import android.graphics.drawable.GradientDrawable
import android.os.Build import android.os.Build
import io.legado.app.ui.book.read.page.PageView import io.legado.app.ui.book.read.page.PageView
import io.legado.app.utils.screenshot
import kotlin.math.* import kotlin.math.*
@Suppress("DEPRECATION") @Suppress("DEPRECATION")
@ -59,10 +58,9 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi
private val mPaint: Paint = Paint() private val mPaint: Paint = Paint()
private var curBitmap: Bitmap? = curPage.screenshot() private var curBitmap: Bitmap? = null
private var prevBitmap: Bitmap? = prevPage.screenshot() private var prevBitmap: Bitmap? = null
private var nextBitmap: Bitmap? = nextPage.screenshot() private var nextBitmap: Bitmap? = null
init { init {
mMaxLength = hypot(pageView.width.toDouble(), pageView.height.toDouble()).toFloat() mMaxLength = hypot(pageView.width.toDouble(), pageView.height.toDouble()).toFloat()

Loading…
Cancel
Save