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. 47
      app/src/main/java/io/legado/app/ui/book/read/ReadMenu.kt

@ -247,16 +247,22 @@ class ReadMenu @JvmOverloads constructor(
//搜索 //搜索
fabSearch.setOnClickListener { fabSearch.setOnClickListener {
runMenuOut { if(AppConfig.isEInkMode)
callBack.openSearchActivity(null) callBack.openSearchActivity(null)
} else
runMenuOut {
callBack.openSearchActivity(null)
}
} }
//自动翻页 //自动翻页
fabAutoPage.setOnClickListener { fabAutoPage.setOnClickListener {
runMenuOut { if(AppConfig.isEInkMode)
callBack.autoPage() callBack.autoPage()
} else
runMenuOut {
callBack.autoPage()
}
} }
//替换 //替换
@ -276,32 +282,47 @@ class ReadMenu @JvmOverloads constructor(
//目录 //目录
llCatalog.setOnClickListener { llCatalog.setOnClickListener {
runMenuOut { if(AppConfig.isEInkMode)
callBack.openChapterList() callBack.openChapterList()
} else
runMenuOut {
callBack.openChapterList()
}
} }
//朗读 //朗读
llReadAloud.setOnClickListener { llReadAloud.setOnClickListener {
runMenuOut { if(AppConfig.isEInkMode)
callBack.onClickReadAloud() callBack.onClickReadAloud()
} else
runMenuOut {
callBack.onClickReadAloud()
}
} }
llReadAloud.onLongClick { llReadAloud.onLongClick {
runMenuOut { callBack.showReadAloudDialog() } if(AppConfig.isEInkMode)
callBack.showReadAloudDialog()
else
runMenuOut { callBack.showReadAloudDialog() }
} }
//界面 //界面
llFont.setOnClickListener { llFont.setOnClickListener {
runMenuOut { if(AppConfig.isEInkMode)
callBack.showReadStyle() callBack.showReadStyle()
} else
runMenuOut {
callBack.showReadStyle()
}
} }
//设置 //设置
llSetting.setOnClickListener { llSetting.setOnClickListener {
runMenuOut { if(AppConfig.isEInkMode)
callBack.showMoreSetting() callBack.showMoreSetting()
} else
runMenuOut {
callBack.showMoreSetting()
}
} }
} }

Loading…
Cancel
Save