双页判断为平板时不在判断底和高

pull/1434/head
gedoor 3 years ago
parent bcd815b05a
commit fe06d2ad7e
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt
  2. 6
      app/src/main/java/io/legado/app/utils/ContextExtensions.kt
  3. 3
      app/src/main/res/values-es-rES/strings.xml
  4. 3
      app/src/main/res/values-ja-rJP/strings.xml
  5. 3
      app/src/main/res/values-pt-rBR/strings.xml
  6. 3
      app/src/main/res/values-zh-rHK/strings.xml
  7. 3
      app/src/main/res/values-zh-rTW/strings.xml
  8. 3
      app/src/main/res/values-zh/strings.xml
  9. 3
      app/src/main/res/values/strings.xml
  10. 2
      app/src/main/res/xml/pref_config_read.xml

@ -591,7 +591,7 @@ object ChapterProvider {
* 更新绘制尺寸 * 更新绘制尺寸
*/ */
fun upLayout() { fun upLayout() {
doublePage = viewWidth > viewHeight doublePage = (viewWidth > viewHeight || appCtx.isPad)
&& ReadBook.pageAnim() != 3 && ReadBook.pageAnim() != 3
&& AppConfig.doublePageHorizontal && AppConfig.doublePageHorizontal
if (viewWidth > 0 && viewHeight > 0) { if (viewWidth > 0 && viewHeight > 0) {

@ -10,6 +10,7 @@ import android.app.Service
import android.content.* import android.content.*
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.content.res.ColorStateList import android.content.res.ColorStateList
import android.content.res.Configuration
import android.graphics.Bitmap import android.graphics.Bitmap
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.net.Uri import android.net.Uri
@ -291,6 +292,11 @@ fun Context.openFileUri(uri: Uri, type: String? = null) {
} }
} }
val Context.isPad: Boolean
get() {
return resources.configuration.screenLayout and Configuration.SCREENLAYOUT_SIZE_MASK >= Configuration.SCREENLAYOUT_SIZE_LARGE
}
val Context.channel: String val Context.channel: String
get() { get() {
try { try {

@ -890,7 +890,7 @@
<string name="disable_source">禁用源</string> <string name="disable_source">禁用源</string>
<string name="delete_source">删除源</string> <string name="delete_source">删除源</string>
<string name="chapter_pay">购买</string> <string name="chapter_pay">购买</string>
<string name="double_page_horizontal">横屏双页</string> <string name="double_page_horizontal">平板/横屏双页</string>
<string name="open_in_browser">浏览器打开</string> <string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string> <string name="copy_url">拷贝url</string>
<string name="open_fun">打开方式</string> <string name="open_fun">打开方式</string>
@ -905,5 +905,6 @@
<string name="tts_speech_reduce">语速减</string> <string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string> <string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -894,7 +894,7 @@
<string name="disable_source">禁用源</string> <string name="disable_source">禁用源</string>
<string name="delete_source">删除源</string> <string name="delete_source">删除源</string>
<string name="chapter_pay">购买</string> <string name="chapter_pay">购买</string>
<string name="double_page_horizontal">横屏双页</string> <string name="double_page_horizontal">平板/横屏双页</string>
<string name="open_in_browser">浏览器打开</string> <string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string> <string name="copy_url">拷贝url</string>
<string name="open_fun">打开方式</string> <string name="open_fun">打开方式</string>
@ -909,5 +909,6 @@
<string name="tts_speech_reduce">语速减</string> <string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string> <string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -894,7 +894,7 @@
<string name="disable_source">禁用源</string> <string name="disable_source">禁用源</string>
<string name="delete_source">删除源</string> <string name="delete_source">删除源</string>
<string name="chapter_pay">购买</string> <string name="chapter_pay">购买</string>
<string name="double_page_horizontal">横屏双页</string> <string name="double_page_horizontal">平板/横屏双页</string>
<string name="open_in_browser">浏览器打开</string> <string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string> <string name="copy_url">拷贝url</string>
<string name="open_fun">打开方式</string> <string name="open_fun">打开方式</string>
@ -909,5 +909,6 @@
<string name="tts_speech_reduce">语速减</string> <string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string> <string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -891,7 +891,7 @@
<string name="disable_source">禁用源</string> <string name="disable_source">禁用源</string>
<string name="delete_source">刪除源</string> <string name="delete_source">刪除源</string>
<string name="chapter_pay">購買</string> <string name="chapter_pay">購買</string>
<string name="double_page_horizontal">橫屏雙頁</string> <string name="double_page_horizontal">平板/橫屏雙頁</string>
<string name="open_in_browser">瀏覽器打開</string> <string name="open_in_browser">瀏覽器打開</string>
<string name="copy_url">複製url</string> <string name="copy_url">複製url</string>
<string name="open_fun">打開方式</string> <string name="open_fun">打開方式</string>
@ -906,5 +906,6 @@
<string name="tts_speech_reduce">語速减</string> <string name="tts_speech_reduce">語速减</string>
<string name="tts_speech_add">語速加</string> <string name="tts_speech_add">語速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -893,7 +893,7 @@
<string name="disable_source">禁用源</string> <string name="disable_source">禁用源</string>
<string name="delete_source">刪除源</string> <string name="delete_source">刪除源</string>
<string name="chapter_pay">購買</string> <string name="chapter_pay">購買</string>
<string name="double_page_horizontal">橫屏雙頁</string> <string name="double_page_horizontal">平板/橫屏雙頁</string>
<string name="open_in_browser">瀏覽器打開</string> <string name="open_in_browser">瀏覽器打開</string>
<string name="copy_url">複製url</string> <string name="copy_url">複製url</string>
<string name="open_fun">打開方式</string> <string name="open_fun">打開方式</string>
@ -908,5 +908,6 @@
<string name="tts_speech_reduce">語速减</string> <string name="tts_speech_reduce">語速减</string>
<string name="tts_speech_add">語速加</string> <string name="tts_speech_add">語速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -893,7 +893,7 @@
<string name="disable_source">禁用源</string> <string name="disable_source">禁用源</string>
<string name="delete_source">删除源</string> <string name="delete_source">删除源</string>
<string name="chapter_pay">购买</string> <string name="chapter_pay">购买</string>
<string name="double_page_horizontal">横屏双页</string> <string name="double_page_horizontal">平板/横屏双页</string>
<string name="open_in_browser">浏览器打开</string> <string name="open_in_browser">浏览器打开</string>
<string name="copy_url">拷贝url</string> <string name="copy_url">拷贝url</string>
<string name="open_fun">打开方式</string> <string name="open_fun">打开方式</string>
@ -908,5 +908,6 @@
<string name="tts_speech_reduce">语速减</string> <string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string> <string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -894,7 +894,7 @@
<string name="disable_source">disable source</string> <string name="disable_source">disable source</string>
<string name="delete_source">delete source</string> <string name="delete_source">delete source</string>
<string name="chapter_pay">pay</string> <string name="chapter_pay">pay</string>
<string name="double_page_horizontal">横屏双页</string> <string name="double_page_horizontal">平板/横屏双页</string>
<string name="open_in_browser">open in browser</string> <string name="open_in_browser">open in browser</string>
<string name="copy_url">copy url</string> <string name="copy_url">copy url</string>
<string name="open_fun">open function</string> <string name="open_fun">open function</string>
@ -909,5 +909,6 @@
<string name="tts_speech_reduce">语速减</string> <string name="tts_speech_reduce">语速减</string>
<string name="tts_speech_add">语速加</string> <string name="tts_speech_add">语速加</string>
<string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string> <string name="open_sys_dir_picker_error">打开系统文件夹选择器出错,自动打开应用文件夹选择器</string>
<string name="expand_text_menu">展开文本选择菜单</string>
</resources> </resources>

@ -126,7 +126,7 @@
<io.legado.app.ui.widget.prefs.SwitchPreference <io.legado.app.ui.widget.prefs.SwitchPreference
android:defaultValue="false" android:defaultValue="false"
android:key="expandTextMenu" android:key="expandTextMenu"
android:title="展开文本选择菜单" android:title="@string/expand_text_menu"
app:iconSpaceReserved="false" app:iconSpaceReserved="false"
app:isBottomBackground="true" /> app:isBottomBackground="true" />

Loading…
Cancel
Save