Hi to all,
i want to switch between two activity, each activity should load her own layout file.
The probem is labels will be dublicated. If I put removeallviews before loading the second layout i don't habe any labels. I've read the tutorials with pannels but i don't want to do it with pannels my project is nearly complete and i don't want to do the hole layout again. Maybe the is a way to solve this.
Thank you for your help.
Main Activity
Second Activity
i want to switch between two activity, each activity should load her own layout file.
The probem is labels will be dublicated. If I put removeallviews before loading the second layout i don't habe any labels. I've read the tutorials with pannels but i don't want to do it with pannels my project is nearly complete and i don't want to do the hole layout again. Maybe the is a way to solve this.
Thank you for your help.
Main Activity
B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim Button1 As Button
Dim Button2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
End Sub
Sub Button1_Down
StartActivity("main")
End Sub
Sub Button2_Down
StartActivity("number2")
End Sub
Second Activity
B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim Button1 As Button
Dim Button2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout2")
End Sub
Sub Button1_Down
StartActivity("main")
End Sub
Sub Button2_Down
StartActivity("number2")
End Sub