I tried to store a reference to the activity in a user class. It is not possible to Dim an Activity object.
gives follwing error:
So if you need access to the activity in a user class sub then you have to pass it always to the sub. I would love to do it only in the Initialize() sub.
I don't know if this is really a bug because Activities are very special objects but is there any possibility to directly access the activity from a user class?
B4X:
Sub Class_Globals
Private mActivity as Activity
End Sub
Sub Initialize(Activity as Activity)
mActivity = Activity
End Sub
gives follwing error:
B4X:
Compiling generated Java code. Error
B4A line: 10
Private mActivity As Activity
javac 1.6.0_23
src\anywheresoftware\b4a\samples\actionlist\slidemenu.java:105: cannot find symbol
symbol : constructor ActivityWrapper()
location: class anywheresoftware.b4a.objects.ActivityWrapper
_mactivity = new anywheresoftware.b4a.objects.ActivityWrapper();
^
1 error
So if you need access to the activity in a user class sub then you have to pass it always to the sub. I would love to do it only in the Initialize() sub.
I don't know if this is really a bug because Activities are very special objects but is there any possibility to directly access the activity from a user class?