Преглед на файлове

Use smallest width instead of width for alt layouts

arkon преди 3 години
родител
ревизия
04ebca8413

+ 2 - 2
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
 }

+ 0 - 0
app/src/main/res/layout-w720dp/main_activity.xml → app/src/main/res/layout-sw720dp/main_activity.xml


+ 0 - 0
app/src/main/res/layout-w720dp/manga_controller.xml → app/src/main/res/layout-sw720dp/manga_controller.xml


+ 0 - 0
app/src/main/res/layout-w720dp/manga_info_header.xml → app/src/main/res/layout-sw720dp/manga_info_header.xml