I am developing an app that makes extensive use of webviews that are incorporated in layouts
When replacing a layout with another I find that it is placed over the old one and does not replace it. For example, buttons that were on the first are still apparent when I load the second.
How to I clear the screen before loading a new layout?
There are several approaches. In most cases the best option is to use multiple activities. Each one with its own layout.
Another option is to load the layout to a panel. Then when you want to remove the layout you can call Panel.RemoveView, create a new panel and load the layout to the new panel.
There are several approaches. In most cases the best option is to use multiple activities. Each one with its own layout.
Another option is to load the layout to a panel. Then when you want to remove the layout you can call Panel.RemoveView, create a new panel and load the layout to the new panel.
Sub LoadLayoutToPanel (Layout As String)
If Panel1.IsInitialized Then
Activity.RemoveViewAt(0)
End If
Panel1.Initialize("")
Panel1.RemoveView
Panel1.LoadLayout(Layout) 'layout that I want load
Activity.AddView(Panel1, 0, 0, 100%x, 100%y)
End Sub