mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-06-05 21:59:15 +02:00
Ensure gridCenters are cleared when dimensions of grid change
This prevents an issue of items that can't be dropped onto the grid, because of missing center values
This commit is contained in:
@ -129,6 +129,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||||||
columnCount = newColumnCount
|
columnCount = newColumnCount
|
||||||
cellXCoords = ArrayList(columnCount)
|
cellXCoords = ArrayList(columnCount)
|
||||||
cellYCoords = ArrayList(rowCount)
|
cellYCoords = ArrayList(rowCount)
|
||||||
|
gridCenters.clear()
|
||||||
iconMargin = (context.resources.getDimension(R.dimen.icon_side_margin) * 5 / columnCount).toInt()
|
iconMargin = (context.resources.getDimension(R.dimen.icon_side_margin) * 5 / columnCount).toInt()
|
||||||
redrawWidgets = true
|
redrawWidgets = true
|
||||||
redrawGrid()
|
redrawGrid()
|
||||||
|
Reference in New Issue
Block a user