I started my application with several buttons on my main form (layout named "menu"). These buttons act as a menu for the application. When any of them are pressed, I want another layout to open for entering data and performing calculations. I created another layout for one of the menu buttons and it opens fine after using an example from Klaus as shown below:
Sub Activity_Create(FirstTime As Boolean)
activity.LoadLayout ("menu")
End Sub
.
.
.
Sub btnembed_click
removeviews
activity.loadLayout("embed")
End Sub
Sub removeviews
Dim i As Int
For i=activity.NumberOfViews-1 To 0 Step -1
activity.removeviewat(i)
Next
End Sub
Now I want to begin coding for the next layout. This scenario will be repeated many times throughout the application. Would each layout become a separate activity with its own variables, etc.? It seems like I would be starting another application by doing "File-new-save, etc". I'm sure the answer is right in front of my face with the tutorials but I can't see it yet. I usually do pretty well after I get over the hump. You guys are great to put up with an old man.
Jim
Sub Activity_Create(FirstTime As Boolean)
activity.LoadLayout ("menu")
End Sub
.
.
.
Sub btnembed_click
removeviews
activity.loadLayout("embed")
End Sub
Sub removeviews
Dim i As Int
For i=activity.NumberOfViews-1 To 0 Step -1
activity.removeviewat(i)
Next
End Sub
Now I want to begin coding for the next layout. This scenario will be repeated many times throughout the application. Would each layout become a separate activity with its own variables, etc.? It seems like I would be starting another application by doing "File-new-save, etc". I'm sure the answer is right in front of my face with the tutorials but I can't see it yet. I usually do pretty well after I get over the hump. You guys are great to put up with an old man.
Jim