pull/32/head
kunfei 5 years ago
parent a137fcb036
commit 316b7bbd59
  1. 1
      app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt
  2. 4
      app/src/main/java/io/legado/app/ui/widget/page/PageView.kt

@ -74,7 +74,6 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_rea
}
setSupportActionBar(toolbar)
initView()
page_view.callback = this
viewModel.callBack = this
viewModel.bookData.observe(this, Observer { title_bar.title = it.name })
viewModel.chapterListFinish.observe(this, Observer { loadContent() })

@ -11,12 +11,13 @@ import io.legado.app.ui.widget.page.delegate.CoverPageDelegate
import io.legado.app.ui.widget.page.delegate.NoAnimPageDelegate
import io.legado.app.ui.widget.page.delegate.PageDelegate
import io.legado.app.ui.widget.page.delegate.SlidePageDelegate
import io.legado.app.utils.activity
import io.legado.app.utils.getPrefInt
class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, attrs),
PageDelegate.PageInterface {
var callback: CallBack? = null
private var callback: CallBack? = null
private var pageDelegate: PageDelegate? = null
private var pageFactory: TextPageFactory? = null
@ -25,6 +26,7 @@ class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, att
var nextPage: ContentView? = null
init {
callback = activity as? CallBack
prevPage = ContentView(context)
addView(prevPage)
nextPage = ContentView(context)

Loading…
Cancel
Save