Update tablet UI

- Only used when width is >= 720dp instead of 600dp (typically 10" tablets)
- Fix fastscroll in manga view (fixes #5267)

(cherry picked from commit b03ebc1fa4)

# Conflicts:
#	app/src/main/res/layout-w720dp/manga_controller.xml
This commit is contained in:
arkon
2021-06-03 23:00:41 -04:00
committed by Jobobby04
parent 3d33d50c63
commit 4f9eb19ead
4 changed files with 13 additions and 15 deletions
@@ -271,8 +271,8 @@ fun Context.createFileInCacheDir(name: String): File {
}
/**
* We consider anything with a width of >= 600dp as a tablet, i.e. with layouts in layout-sw600dp.
* We consider anything with a width of >= 720dp as a tablet, i.e. with layouts in layout-w720dp.
*/
fun Context.isTablet(): Boolean {
return resources.configuration.screenWidthDp >= 600
return (resources.displayMetrics.widthPixels / resources.displayMetrics.density) >= 720
}