|
|
@ -346,6 +346,10 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo |
|
|
|
toast(R.string.read_aloud_pause) |
|
|
|
toast(R.string.read_aloud_pause) |
|
|
|
return true |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (isAutoPage) { |
|
|
|
|
|
|
|
autoPageStop() |
|
|
|
|
|
|
|
return true |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -561,9 +565,7 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
override fun autoPage() { |
|
|
|
override fun autoPage() { |
|
|
|
if (isAutoPage) { |
|
|
|
if (isAutoPage) { |
|
|
|
isAutoPage = false |
|
|
|
autoPageStop() |
|
|
|
mHandler.removeCallbacks(autoPageRunnable) |
|
|
|
|
|
|
|
page_view.upContent() |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
isAutoPage = true |
|
|
|
isAutoPage = true |
|
|
|
autoPagePlus() |
|
|
|
autoPagePlus() |
|
|
@ -571,6 +573,12 @@ class ReadBookActivity : VMBaseActivity<ReadBookViewModel>(R.layout.activity_boo |
|
|
|
read_menu.setAutoPage(isAutoPage) |
|
|
|
read_menu.setAutoPage(isAutoPage) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun autoPageStop() { |
|
|
|
|
|
|
|
isAutoPage = false |
|
|
|
|
|
|
|
mHandler.removeCallbacks(autoPageRunnable) |
|
|
|
|
|
|
|
page_view.upContent() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private fun autoPagePlus() { |
|
|
|
private fun autoPagePlus() { |
|
|
|
mHandler.removeCallbacks(autoPageRunnable) |
|
|
|
mHandler.removeCallbacks(autoPageRunnable) |
|
|
|
autoPageProgress++ |
|
|
|
autoPageProgress++ |
|
|
|