diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt index 39878510f..5e87c2c61 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/system/ContextExtensions.kt @@ -271,8 +271,8 @@ fun Context.createFileInCacheDir(name: String): File { } /** - * We consider anything with a width of >= 720dp as a tablet, i.e. with layouts in layout-w720dp. + * We consider anything with a width of >= 720dp as a tablet, i.e. with layouts in layout-sw720dp. */ fun Context.isTablet(): Boolean { - return (resources.displayMetrics.widthPixels / resources.displayMetrics.density) >= 720 + return resources.configuration.smallestScreenWidthDp >= 720 } diff --git a/app/src/main/res/layout-w720dp/main_activity.xml b/app/src/main/res/layout-sw720dp/main_activity.xml similarity index 100% rename from app/src/main/res/layout-w720dp/main_activity.xml rename to app/src/main/res/layout-sw720dp/main_activity.xml diff --git a/app/src/main/res/layout-w720dp/manga_controller.xml b/app/src/main/res/layout-sw720dp/manga_controller.xml similarity index 100% rename from app/src/main/res/layout-w720dp/manga_controller.xml rename to app/src/main/res/layout-sw720dp/manga_controller.xml diff --git a/app/src/main/res/layout-w720dp/manga_info_header.xml b/app/src/main/res/layout-sw720dp/manga_info_header.xml similarity index 100% rename from app/src/main/res/layout-w720dp/manga_info_header.xml rename to app/src/main/res/layout-sw720dp/manga_info_header.xml