Android Question RemoveAllViews

klaus

Expert
Licensed User
Longtime User
What exactly doesn't work with RemoveAllViews ?

I have modified your CleanPanel routine like this:
B4X:
Sub CleanPanel
    Log(Panel1.NumberOfViews)
    Panel1.RemoveAllViews
    Log(Panel1.NumberOfViews)
End Sub
With the two Logs you'll see that the number views is 12 before Panel1.RemoveAllViews and 0 after.
So RemoveAllViews works as expected.
 
Last edited:
Upvote 0

mangojack

Expert
Licensed User
Longtime User
Klaus ... the last line of your amended CleanPanel sub .. " Panel1.NumberOfViews-1To0Step -" ... should that be there ?
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
What exactly doesn't work with RemoveAllViews ?

I have modified your CleanPanel routine like this:
B4X:
Sub CleanPanel
    Log(Panel1.NumberOfViews)
    Panel1.RemoveAllViews
    Log(Panel1.NumberOfViews)
End Sub
With the two Logs you'll see that the number views is 12 before Panel1.RemoveAllViews and 0 after.
So RemoveAllViews works as expected.


You are right, Klaus, about the log (also using RemoveAt log is the same), but ... the images remain visible in the panel!

I tried to use Panel1.Invalidate (which, if I'm not mistaken, is the equivalent of Refresh in VB.Net) but it still does not work.

Only excluding the animation (change the comments), the result becomes well
 
Upvote 0
Top