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:
parent
a429fba97f
commit
3a4f4b47a9
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||
columnCount = newColumnCount
|
||||
cellXCoords = ArrayList(columnCount)
|
||||
cellYCoords = ArrayList(rowCount)
|
||||
gridCenters.clear()
|
||||
iconMargin = (context.resources.getDimension(R.dimen.icon_side_margin) * 5 / columnCount).toInt()
|
||||
redrawWidgets = true
|
||||
redrawGrid()
|
||||
|
|
Loading…
Reference in a new issue