Android Question Template for B4XPage

Robert Valentino

Well-Known Member
Licensed User
Longtime User
When I create a new page:
1604697834108.png


the B4XPage created looks like this:

B4X:
Sub Class_Globals
    Private Root As B4XView 'ignore
    Private xui As XUI 'ignore
End Sub

'You can add more parameters here.
Public Sub Initialize As Object
    Return Me
End Sub

'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    'load the layout to Root
    
End Sub

'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.

Now that we can use templates, I am trying to figure out how to create a template to create a B4XPage?
I understand how to create one for a Project but not sure how to do a B4XPage

BobVal
 

Star-Dust

Expert
Licensed User
Longtime User
See also
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Ok, GR8. I've created my custom class and it does get created properly.

2 Questions:

1) When my custom class gets created and when I look at it with an outside editor it says:
Group=Default Group but when I create a B4XPage it says: Group=Pages
How do I get my custom class to say Group=Pages

2) When creating a custom class the IDE asks me for a Module Name
1604847565551.png

Is there anyway to get that module name as a symbolic replacement in the custom class that I am creating
B4X:
Log($"${modulename}::Initialize"$)
 
Upvote 0
Top