Hello,
I'm trying to replace a container in a table layout:
Container newContainer = getNewContainer();
tableContainer.replace(oldContainer, newContainer, null);
activityContainer.revalidate();
The old container is indeed gone. However, the new container is placed on the bottom of the Container with the TableLayout, instead of replacing the old one.
With the following code, the same happens (maybe replace is doing the same):
int oldContainerIndex = tableContainer.getComponentIndex(oldContainer);
tableContainer.remove(oldContainer);
tableContainer.addComponent(newContainer, oldContainerIndex);
Is this supposed to work (so somewhere my code is wrong) or is there another way to replace a container in a TableLayout?