mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-16 14:07:28 +01:00
Hide irrelevant settings on tablets
This commit is contained in:
@@ -258,3 +258,10 @@ fun Context.createFileInCacheDir(name: String): File {
|
||||
file.createNewFile()
|
||||
return file
|
||||
}
|
||||
|
||||
/**
|
||||
* We consider anything with a width of >= 600dp as a tablet, i.e. with layouts in layout-sw600dp.
|
||||
*/
|
||||
fun Context.isTablet(): Boolean {
|
||||
return resources.configuration.screenWidthDp >= 600
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user