|
|
@ -4,7 +4,6 @@ import android.content.Context |
|
|
|
import android.graphics.Canvas |
|
|
|
import android.graphics.Canvas |
|
|
|
import android.graphics.Paint |
|
|
|
import android.graphics.Paint |
|
|
|
import android.util.AttributeSet |
|
|
|
import android.util.AttributeSet |
|
|
|
import android.util.Log |
|
|
|
|
|
|
|
import android.view.View |
|
|
|
import android.view.View |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.constant.PreferKey |
|
|
|
import io.legado.app.constant.PreferKey |
|
|
@ -159,14 +158,13 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at |
|
|
|
if (pageOffset > 0) { |
|
|
|
if (pageOffset > 0) { |
|
|
|
pageFactory.moveToPrev() |
|
|
|
pageFactory.moveToPrev() |
|
|
|
textPage = pageFactory.currentPage ?: TextPage().format() |
|
|
|
textPage = pageFactory.currentPage ?: TextPage().format() |
|
|
|
Log.e("pageOffSet", pageOffset.toString() + " " + textPage.height) |
|
|
|
|
|
|
|
pageOffset -= textPage.height |
|
|
|
pageOffset -= textPage.height |
|
|
|
callBack.upContent(0, false) |
|
|
|
// callBack.upContent(0, false) |
|
|
|
} else if (pageOffset < -textPage.height) { |
|
|
|
} else if (pageOffset < -textPage.height) { |
|
|
|
pageOffset += textPage.height |
|
|
|
pageOffset += textPage.height |
|
|
|
pageFactory.moveToNext() |
|
|
|
pageFactory.moveToNext() |
|
|
|
textPage = pageFactory.currentPage ?: TextPage().format() |
|
|
|
textPage = pageFactory.currentPage ?: TextPage().format() |
|
|
|
callBack.upContent(0, false) |
|
|
|
// callBack.upContent(0, false) |
|
|
|
} |
|
|
|
} |
|
|
|
invalidate() |
|
|
|
invalidate() |
|
|
|
} |
|
|
|
} |
|
|
|