Hi, the problem iam facing here is htis:
CallSub2(Main,"show",pan)
is not working, and when i go to debug mode it dosnt call the show sub in main, so i need your help to show the panel on mobile screen.
Main:
ImaginaryMain:
CallSub2(Main,"show",pan)
is not working, and when i go to debug mode it dosnt call the show sub in main, so i need your help to show the panel on mobile screen.
Main:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Public pan As Panel
Public Father As ImaginaryMain
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Father.Initialize
pan.Initialize("hi")
Father.show
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub show(pl As Panel)
Activity.Addview(pan, 0,0,100%x,100%y)
End Sub
ImaginaryMain:
B4X:
'Class module
Sub Class_Globals
Private pan As Panel
Private page1 As page
Private pgdisp As pageidsplay
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
' page1.Initialize
' pgdisp.Initialize(Me)
pan.Initialize("xxx")
pan.Color=Colors.Red
End Sub
public Sub show
CallSub2(Main ,"show",pan)
End Sub
Last edited: