Creating and Destroying Objects at Runtime...

sconcequence

Member
Licensed User
Longtime User
With Basic4Android, is it possible to create and destroy objects at runtime?

Something Like This:

B4X:
Dim test As Object
test = New Panel
...
delete test

I've searched everywhere for a reference on this, without success.

Thanks.

--
 

kickaha

Well-Known Member
Licensed User
Longtime User
Yes you can.

The following initializes a panel:
B4X:
Dim pnlNew As Panel 
pnlNew.Initialize ("")

Have a look in the documentation for each view for details and how to place them.

You do not need to destroy the view, the OS will take care of that when it needs to.
 
Upvote 0
Top