Thanks for your usual quick reply, Klaus.
I must have messed something up in my setup of B4A. This does not work here.
I did add the Activity.NumberOfViews to the click event. The number does descend.
However, my panels are not transparent. Layout is Green. Spinner is Red. Label is in Layout.
When I AddView Spinner, the panel is red, but I still see the label in Layout. Neither should be true. Right?
When I SpinnerPage.RemoveView, the screen is still red. I would expect it to be green.
Log:
** Activity (main) Create, isFirst = true **
Activity_Create
** Activity (main) Resume **
REMOVE VIEW
Before 2
After 1
Sub Globals
'These global variables will be redeclared each time the activity is created.
Private SpinnerPage As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Log("Activity_Create")
Activity.LoadLayout("Layout")
Sleep(3000) ' So I Can See the Green Background
TestSpinner
End Sub
Private Sub TestSpinner
SpinnerPage.Initialize("SpinnerPage")
Activity.AddView(SpinnerPage,0,0,100%x,100%y)
Activity.LoadLayout("Spinner")
End Sub
Private Sub Label1_Click
Log("REMOVE VIEW")
Log("Before " & Activity.NumberOfViews)
SpinnerPage.RemoveView
Log("After " & Activity.NumberOfViews)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
[\CODE]