tsteward Well-Known Member Licensed User Longtime User Dec 31, 2018 #1 Looking for some examples for cross platform B4J & B4A on how to open new activity/screen I have searched but missing the plot. Thank you for any guidance
Looking for some examples for cross platform B4J & B4A on how to open new activity/screen I have searched but missing the plot. Thank you for any guidance
mangojack Expert Licensed User Longtime User Dec 31, 2018 #2 Unsure if there is a cross platform method .. I sure your'e aware how to start new Activity in B4A. Are you asking how to display a new screen / form in B4J ? Upvote 0
Unsure if there is a cross platform method .. I sure your'e aware how to start new Activity in B4A. Are you asking how to display a new screen / form in B4J ?
tsteward Well-Known Member Licensed User Longtime User Dec 31, 2018 #3 Yes my current app has many activitiesso opening and closing is fine. I have a B4J app which also displays multiple forms. I am looking at re-writing and statring again as I want to support all 3 B4J, B4A and B4I in the most efficient way possible and am trying to learn XUI and how do do all this. I have watch video tutorials but would love to see how people are handling this situation. Upvote 0
Yes my current app has many activitiesso opening and closing is fine. I have a B4J app which also displays multiple forms. I am looking at re-writing and statring again as I want to support all 3 B4J, B4A and B4I in the most efficient way possible and am trying to learn XUI and how do do all this. I have watch video tutorials but would love to see how people are handling this situation.
Erel B4X founder Staff member Licensed User Longtime User Dec 31, 2018 #4 You should implement everything that you can related to each screen in a class. This class will then be shared between the different platforms. The activity module itself shouldn't be shared. You can pass the base view to the class: Code: Copy Public Sub Initialize(Parent As B4XView) Parent.LoadLayout(...) ... End Sub Initialize it like this: Code: Copy Screen1.Initialize(Activity) 'or Screen1.Initialize(Form.RootPane) 'or Screen1.Initialize(Page1.RootPanel) Upvote 0
You should implement everything that you can related to each screen in a class. This class will then be shared between the different platforms. The activity module itself shouldn't be shared. You can pass the base view to the class: Code: Copy Public Sub Initialize(Parent As B4XView) Parent.LoadLayout(...) ... End Sub Initialize it like this: Code: Copy Screen1.Initialize(Activity) 'or Screen1.Initialize(Form.RootPane) 'or Screen1.Initialize(Page1.RootPanel)