-
Notifications
You must be signed in to change notification settings - Fork 428
Description
Hi everyone
I try to change the individual elements in the grid colSpan and rowSpan.
If the element being changed has the same height as the others - all is more or less normal:
Otherwise, the item simply disappears:
But if I add a new element to the grid, the missing item appears:
After change colSpan and rowSpan values, i call method notifyDataSetChanged() in the adapter.
Question - this is normal behavior and I do something wrong?
UPD:
My code (Kotlin):
(GridDevicesView - My custom heir to the AsymmetricItem interface,
items: List = ArrayList())
asymGrid = mainView.findViewById(R.id.testAsymGrid) asymGrid.requestedHorizontalSpacing = AsymGridUtils.dpToPx(context, 2f) asymGrid.setRequestedColumnCount(3) asymGrid.isDebugging = true asymGrid.isAllowReordering = true asymGridAdapter = GridDevicesAdapter(context, items, asymGrid) // My custom heir of ArrayAdapter asymGridAdapter.add(GridDevicesView(GridTileSize(1/*rowSpan*/,1/*colSpan*/))) asymGridAdapter.add(GridDevicesView(GridTileSize(2,1))) asymGridAdapter.add(GridDevicesView(GridTileSize(2,1)))



