|
|
@ -7,6 +7,7 @@ import android.graphics.Color |
|
|
|
import android.util.AttributeSet |
|
|
|
import android.util.AttributeSet |
|
|
|
import android.view.MotionEvent |
|
|
|
import android.view.MotionEvent |
|
|
|
import android.widget.FrameLayout |
|
|
|
import android.widget.FrameLayout |
|
|
|
|
|
|
|
import io.legado.app.R |
|
|
|
import io.legado.app.ui.widget.page.delegate.CoverPageDelegate |
|
|
|
import io.legado.app.ui.widget.page.delegate.CoverPageDelegate |
|
|
|
import io.legado.app.ui.widget.page.delegate.PageDelegate |
|
|
|
import io.legado.app.ui.widget.page.delegate.PageDelegate |
|
|
|
import kotlinx.android.synthetic.main.view_book_page.view.* |
|
|
|
import kotlinx.android.synthetic.main.view_book_page.view.* |
|
|
@ -28,7 +29,7 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att |
|
|
|
addView(nextPage) |
|
|
|
addView(nextPage) |
|
|
|
curPage = ContentView(context) |
|
|
|
curPage = ContentView(context) |
|
|
|
addView(curPage) |
|
|
|
addView(curPage) |
|
|
|
|
|
|
|
upBg() |
|
|
|
setWillNotDraw(false) |
|
|
|
setWillNotDraw(false) |
|
|
|
|
|
|
|
|
|
|
|
page_panel.backgroundColor = Color.WHITE |
|
|
|
page_panel.backgroundColor = Color.WHITE |
|
|
@ -111,6 +112,13 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att |
|
|
|
nextPage?.upStyle() |
|
|
|
nextPage?.upStyle() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun upBg() { |
|
|
|
|
|
|
|
val bg = context.getDrawable(R.drawable.bg1) |
|
|
|
|
|
|
|
curPage?.setBg(bg) |
|
|
|
|
|
|
|
prevPage?.setBg(bg) |
|
|
|
|
|
|
|
nextPage?.setBg(bg) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun upTime() { |
|
|
|
fun upTime() { |
|
|
|
curPage?.upTime() |
|
|
|
curPage?.upTime() |
|
|
|
prevPage?.upTime() |
|
|
|
prevPage?.upTime() |
|
|
|