Merge pull request #2199 from Kalinundefined/master

disable popup animations when eink mode enabled, fixed #1398 | 解决部分墨水屏设备上按钮无效的问题
pull/2208/head
kunfei 2 years ago committed by GitHub
commit 2950d8f6d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 21
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -247,6 +247,9 @@ class ReadMenu @JvmOverloads constructor(
//搜索 //搜索
fabSearch.setOnClickListener { fabSearch.setOnClickListener {
if(AppConfig.isEInkMode)
callBack.openSearchActivity(null)
else
runMenuOut { runMenuOut {
callBack.openSearchActivity(null) callBack.openSearchActivity(null)
} }
@ -254,6 +257,9 @@ class ReadMenu @JvmOverloads constructor(
//自动翻页 //自动翻页
fabAutoPage.setOnClickListener { fabAutoPage.setOnClickListener {
if(AppConfig.isEInkMode)
callBack.autoPage()
else
runMenuOut { runMenuOut {
callBack.autoPage() callBack.autoPage()
} }
@ -276,6 +282,9 @@ class ReadMenu @JvmOverloads constructor(
//目录 //目录
llCatalog.setOnClickListener { llCatalog.setOnClickListener {
if(AppConfig.isEInkMode)
callBack.openChapterList()
else
runMenuOut { runMenuOut {
callBack.openChapterList() callBack.openChapterList()
} }
@ -283,15 +292,24 @@ class ReadMenu @JvmOverloads constructor(
//朗读 //朗读
llReadAloud.setOnClickListener { llReadAloud.setOnClickListener {
if(AppConfig.isEInkMode)
callBack.onClickReadAloud()
else
runMenuOut { runMenuOut {
callBack.onClickReadAloud() callBack.onClickReadAloud()
} }
} }
llReadAloud.onLongClick { llReadAloud.onLongClick {
if(AppConfig.isEInkMode)
callBack.showReadAloudDialog()
else
runMenuOut { callBack.showReadAloudDialog() } runMenuOut { callBack.showReadAloudDialog() }
} }
//界面 //界面
llFont.setOnClickListener { llFont.setOnClickListener {
if(AppConfig.isEInkMode)
callBack.showReadStyle()
else
runMenuOut { runMenuOut {
callBack.showReadStyle() callBack.showReadStyle()
} }
@ -299,6 +317,9 @@ class ReadMenu @JvmOverloads constructor(
//设置 //设置
llSetting.setOnClickListener { llSetting.setOnClickListener {
if(AppConfig.isEInkMode)
callBack.showMoreSetting()
else
runMenuOut { runMenuOut {
callBack.showMoreSetting() callBack.showMoreSetting()
} }

Loading…
Cancel
Save