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

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

Loading…
Cancel
Save