clear and reset screen

zxxdaro

Member
Licensed User
Longtime User
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?
 

dbryan

Member
Licensed User
Longtime User

:sign0013:

I know this is an old thread but could you show some code examples? That usually explains things to me easier.
 
Upvote 0

Kbogle24

Member
Licensed User
Longtime User
B4X:
LoadLayoutToPanel ("simplelayout")

B4X:
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

Hope that helps some.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…