|
|
@ -34,14 +34,9 @@ abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
protected var touchX: Float = 0f |
|
|
|
protected var touchX: Float = 0f |
|
|
|
protected var touchY: Float = 0f |
|
|
|
protected var touchY: Float = 0f |
|
|
|
|
|
|
|
|
|
|
|
protected val nextPage: ContentView |
|
|
|
protected val nextPage: ContentView get() = pageView.nextPage |
|
|
|
get() = pageView.nextPage |
|
|
|
protected val curPage: ContentView get() = pageView.curPage |
|
|
|
|
|
|
|
protected val prevPage: ContentView get() = pageView.prevPage |
|
|
|
protected val curPage: ContentView |
|
|
|
|
|
|
|
get() = pageView.curPage |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected val prevPage: ContentView |
|
|
|
|
|
|
|
get() = pageView.prevPage |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected var bitmap: Bitmap? = null |
|
|
|
protected var bitmap: Bitmap? = null |
|
|
|
|
|
|
|
|
|
|
@ -90,7 +85,7 @@ abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
touchY = y |
|
|
|
touchY = y |
|
|
|
|
|
|
|
|
|
|
|
if (invalidate) { |
|
|
|
if (invalidate) { |
|
|
|
pageView.postInvalidate() |
|
|
|
pageView.invalidate() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onScroll() |
|
|
|
onScroll() |
|
|
@ -187,12 +182,11 @@ abstract class PageDelegate(protected val pageView: PageView) : |
|
|
|
|
|
|
|
|
|
|
|
abstract fun onAnimStart()//scroller start |
|
|
|
abstract fun onAnimStart()//scroller start |
|
|
|
|
|
|
|
|
|
|
|
abstract fun onDraw(canvas: Canvas)//绘制 |
|
|
|
open fun onDraw(canvas: Canvas) {}//绘制 |
|
|
|
|
|
|
|
|
|
|
|
abstract fun onAnimStop()//scroller finish |
|
|
|
abstract fun onAnimStop()//scroller finish |
|
|
|
|
|
|
|
|
|
|
|
open fun onScroll() {//移动contentView, slidePage |
|
|
|
open fun onScroll() {}//移动contentView, slidePage |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@CallSuper |
|
|
|
@CallSuper |
|
|
|
open fun setDirection(direction: Direction) { |
|
|
|
open fun setDirection(direction: Direction) { |
|
|
|