I often counter such issues :
- create a page
- add a view to the page .
- add a container to the page
- add a view to the container
- remove container all items .
- create another view instance with same id into the container
- duplicate id
My questions is :
. When I removed the container all items ,the view should be destroyed . so when I create the view again it should be unique .
I debug and found that the view still exist ?
Why .
And more some cusomer controls have same issues .
ex:
A control aggregate B control
When render A control , I create a matrix layout cell and add B control into the cell .
Then you will find that the B control will disappeared from the A aggregation properties .
If you bind some properties on A and B , when model changed A will be re-render then the duplicate Id issues will occur .