Center grid
This commit is contained in:
parent
dd0cc81a42
commit
9643b2b7fd
1 changed files with 2 additions and 2 deletions
|
@ -71,8 +71,8 @@ open class LevelFragment : CommonLevelFragment(R.layout.fragment_level) {
|
|||
recyclerGrid.post {
|
||||
levelSetup.value?.let { minefield ->
|
||||
val size = dimensionRepository.areaSizeWithPadding()
|
||||
val dx = (minefield.width + 2) * size * 0.25f
|
||||
val dy = (minefield.height + 2) * size * 0.25f
|
||||
val dx = minefield.width * size * 0.25f
|
||||
val dy = (minefield.height * size + dimensionRepository.actionBarSize()) * 0.25f - size * 3
|
||||
recyclerGrid.smoothScrollBy(dx.toInt(), dy.toInt(), null, 200)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue