Hello,
Since the switching between activities is rather slow I was thinking of going for code modules to have my code seperated as much as possible and work with swappable panels instead.
I remember from a previous project that code modules behave different so I have a few questions about them.
As my main activity can't be used with commands like main.addview() I tried to pass the activity to the sub and store it in a variable so that it's reachable from the other sub in the code module aswell without the need to pass it to all subs.
but then I get "Can not access activity from sub"
is there a way to add view to my "Main" activity from in a code module?
or do I have to call a sub in my main activity just for the view adding?
Since the switching between activities is rather slow I was thinking of going for code modules to have my code seperated as much as possible and work with swappable panels instead.
I remember from a previous project that code modules behave different so I have a few questions about them.
As my main activity can't be used with commands like main.addview() I tried to pass the activity to the sub and store it in a variable so that it's reachable from the other sub in the code module aswell without the need to pass it to all subs.
B4X:
Dim dst As Activity
Sub downloaddata(dstact)
dst=dstact
End Sub
but then I get "Can not access activity from sub"
is there a way to add view to my "Main" activity from in a code module?
or do I have to call a sub in my main activity just for the view adding?