Using Fragments, i want to restore the UI state if UI elements are created dynamically at Run-time. Like below is my layout image,
Above, is my default Layout with one Edit Text box. And buttons are created dynamically at Run-time. On click ADD button, it will add one more Edit Text box in the layout.
Like below, if click twice ADD button, it will be ,
I want to store UI state in BackStack, So if i will switch to another Fragment and get back to same(Dynamic Layout), it will shown the same UI state. But it doesn't, it is showing the default Layout with one Edit Text box.
How to maintain UI state ? If created dynamically .