|
|
@ -101,14 +101,16 @@ class PageView(context: Context, attrs: AttributeSet) : |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun upContent(position: Int = 0) { |
|
|
|
fun upContent(position: Int = 0) { |
|
|
|
pageFactory.let { |
|
|
|
if (isScrollDelegate) { |
|
|
|
|
|
|
|
curPage.setContent(pageFactory.currentPage()) |
|
|
|
|
|
|
|
} else { |
|
|
|
when (position) { |
|
|
|
when (position) { |
|
|
|
-1 -> prevPage.setContent(it.previousPage()) |
|
|
|
-1 -> prevPage.setContent(pageFactory.previousPage()) |
|
|
|
1 -> nextPage.setContent(it.nextPage()) |
|
|
|
1 -> nextPage.setContent(pageFactory.nextPage()) |
|
|
|
else -> { |
|
|
|
else -> { |
|
|
|
curPage.setContent(it.currentPage()) |
|
|
|
curPage.setContent(pageFactory.currentPage()) |
|
|
|
nextPage.setContent(it.nextPage()) |
|
|
|
nextPage.setContent(pageFactory.nextPage()) |
|
|
|
prevPage.setContent(it.previousPage()) |
|
|
|
prevPage.setContent(pageFactory.previousPage()) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|