Android Question Idea and question for app prototyping

Cadenzo

Active Member
Licensed User
Longtime User
I thought about an app for prototyping apps. You (or your designers) could design and collect views. For prototyping this views could be connected with:
  • Activities / Pages, Panels
  • xCustomListViews (with collections of views)
  • Custom Dialogs
You could not only put the views into Panels (ListViews, Dialogs,...) but also put actions to the events (like button_Click) of the views. This actions could be:
  • Open a new Activity / Page
  • Open a Dialog
  • Call a custom Sub
So you could in minutes prototype your new app ideas, even cross platform, and this is only the top of the possibilities, I emagine.

So far for theory. How to get this remote created prototypes into this prototyping-app?

Best way, to load layouts dynamically, not from assets, to have something like "Panel1.LoadLayout2(Dir as String, LayoutFile as String)", also to load layout in JSON format.
But for now, could I use B4XViews this way, to create layouts dynamically from JSON (or another script) in runtime?
B4X:
Sub CreateView(typ As String, name As String) As B4XView
    Dim obj As B4XView
    Select typ
        Case "Label"
            Dim lbl As Label
            lbl.Initialize(name)
            obj = lbl
        Case "Button"
            Dim btn As Button
            btn.Initialize(name)
            obj = btn   
        '...
            
    End Select
    Return obj
End Sub
Or is there a better way?
 
Top