Really great, how much code we can already share between B4A, B4i and B4J, very good explained in B4X Cross-platform projects. But each new Page / Form / Activity needs two new modules. Wouldn't it save time, if we can choose Project / Add New Module / "Cross-platform"?
If the Class xSceen2 is not existing yet, it will be created (in the shared folder) with every default settings like defining the xui object and the Sub Initialize.
Another detail:
In the docu it is recommed to use names like Screen2 and xScreen2. But in my opinion it would be better to use something like Screen2 and Screen2Class or Screen2Shared , because it would be in a perfect alphabetical order in the IDE Modules list.
Let's say, we choose the name "Screen2", all the code (in B4A case) could be already done::
Sub Process_Globals
End Sub
Sub Globals
Private xMe As xScreen2
End Sub
Sub Activity_Create(FirstTime As Boolean) 'We don't load the layout here, but in the shared class
'Activity.LoadLayout("Layout1")
If xMe.IsInitialized = False Then
xMe.Initialize(Activity)
End If
xMe.Show
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause(UserClosed As Boolean)
Activity.Finish
End Sub
If the Class xSceen2 is not existing yet, it will be created (in the shared folder) with every default settings like defining the xui object and the Sub Initialize.
Another detail:
In the docu it is recommed to use names like Screen2 and xScreen2. But in my opinion it would be better to use something like Screen2 and Screen2Class or Screen2Shared , because it would be in a perfect alphabetical order in the IDE Modules list.
Last edited: