Skip to content

Instantly share code, notes, and snippets.

fun isTablet(context: Context?): Boolean {
val screenLytSize = context?.resources?.configuration?.screenLayout?.and(Configuration.SCREENLAYOUT_SIZE_MASK)
screenLytSize ?: return false
return screenLytSize >= Configuration.SCREENLAYOUT_SIZE_LARGE
}