internal val Context.numberOfGridColumns: Int get() { val displayMetrics = resources.displayMetrics val screenWidthDp = displayMetrics.widthPixels / displayMetrics.density return (screenWidthDp / MIN_COLUMN_WIDTH_DP).toInt().coerceAtLeast(2) }
Returns the number of grid columns we can fit on the screen in the tabs tray.