pull/32/head
kunfei 5 years ago
parent e7d33bb570
commit af90d2e3c4
  1. 9
      app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt
  2. 3
      app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt

@ -22,7 +22,6 @@ import io.legado.app.service.ReadAloudService
import io.legado.app.ui.changesource.ChangeSourceDialog
import io.legado.app.ui.chapterlist.ChapterListActivity
import io.legado.app.ui.readbook.config.MoreConfigDialog
import io.legado.app.ui.readbook.config.ReadAloudDialog
import io.legado.app.ui.readbook.config.ReadStyleDialog
import io.legado.app.ui.replacerule.ReplaceRuleActivity
import io.legado.app.ui.sourceedit.SourceEditActivity
@ -143,14 +142,6 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_rea
MoreConfigDialog().show(supportFragmentManager, "moreConfig")
}
override fun showReadAloud(): Boolean {
if (readAloudStatus == Status.STOP) {
return false
}
ReadAloudDialog().show(supportFragmentManager, "readAloud")
return true
}
override fun menuShow() {
Help.upSystemUiVisibility(window, !read_menu.isVisible)
}

@ -67,14 +67,12 @@ class ReadMenu : FrameLayout {
}
fun runMenuIn() {
if (callback?.showReadAloud() != true) {
this.visible()
title_bar.visible()
bottom_menu.visible()
title_bar.startAnimation(menuTopIn)
bottom_menu.startAnimation(menuBottomIn)
}
}
fun runMenuOut(onMenuOutEnd: (() -> Unit)? = null) {
this.onMenuOutEnd = onMenuOutEnd
@ -241,7 +239,6 @@ class ReadMenu : FrameLayout {
fun openChapterList()
fun showReadStyle()
fun showMoreSetting()
fun showReadAloud(): Boolean
fun menuShow()
fun menuHide()
}

Loading…
Cancel
Save