Center board considering navigation bar

This commit is contained in:
Lucas Lima 2020-06-20 16:41:03 -03:00
parent 2f141f1b73
commit d1fa4ec806
No known key found for this signature in database
GPG key ID: 0259A3F43EC1027A

View file

@ -67,7 +67,10 @@ abstract class CommonLevelFragment : Fragment() {
0
}
val height = displayMetrics.heightPixels - actionBarHeight
val resourceId: Int = resources.getIdentifier("navigation_bar_height", "dimen", "android")
val bottom = if (resourceId > 0) { resources.getDimensionPixelSize(resourceId) } else 0
val height = displayMetrics.heightPixels - actionBarHeight - bottom
val recyclerViewHeight = (dimensionRepository.areaSize() * boardHeight)
val separatorsHeight = (dimensionRepository.areaSeparator() * (boardHeight - 1))