Merge branch 'add-recycler-padding' of github.com:lucasnlm/antimine-android into add-recycler-padding
This commit is contained in:
commit
0ba4bb4a11
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ abstract class CommonLevelFragment(@LayoutRes val contentLayoutId: Int) : Fragme
|
|||
val width = view.measuredWidth
|
||||
val recyclerViewWidth = (dimensionRepository.areaSize() * boardWidth)
|
||||
val separatorsWidth = (dimensionRepository.areaSeparator() * (boardWidth + 2))
|
||||
return ((width - recyclerViewWidth - separatorsWidth) / 2).coerceAtLeast(0f).nextDown().toInt()
|
||||
return ((width - recyclerViewWidth - separatorsWidth) / 2).coerceAtLeast(0.0f).nextDown().toInt()
|
||||
}
|
||||
|
||||
private fun calcVerticalPadding(view: View, boardHeight: Int): Int {
|
||||
|
@ -65,7 +65,7 @@ abstract class CommonLevelFragment(@LayoutRes val contentLayoutId: Int) : Fragme
|
|||
val recyclerViewHeight = (dimensionRepository.areaSize() * boardHeight)
|
||||
val separatorsHeight = (2 * dimensionRepository.areaSeparator() * (boardHeight - 1))
|
||||
val calculatedHeight = (height - recyclerViewHeight - separatorsHeight - adsHeight)
|
||||
return ((calculatedHeight / 2) - adsHeight).coerceAtLeast(0f).toInt()
|
||||
return ((calculatedHeight / 2) - adsHeight).coerceAtLeast(0.0f).toInt()
|
||||
}
|
||||
|
||||
open fun dpFromPx(context: Context, px: Float): Int {
|
||||
|
|
Loading…
Reference in a new issue