Sub cmbFontSize_SelectedIndexChanged (Index As Int)
Starter.TextSize=Starter.TextSizeMin+Index
function.setViewHeight(Activity)
Activity.Finish
StartActivity(Me)
End Sub
LucaMs, thanks!
Unfortunately, this does not raise B4XPage_Created.
I have the necessary actions take place there.
If there is no other solution, I will have to move the necessary actions to B4XPage_Appear.
Sub cmbFontSize_SelectedIndexChanged (Index As Int)
Starter.TextSize=Starter.TextSizeMin+Index
'-------------------------------------------
'function.setViewHeight(Activity)
function.setViewHeight(Root) 'You can use Root or Me in place of Activity
'-----------------------------------------
'Activity.Finish
'StartActivity(Me)
B4XPages.ShowPageAndRemovePreviousPages("MainPage") 'Use the ID of the page you want to goto
End Sub
mcqueccu, my page to reload is "Settings".
This code works:
B4X:
Sub cmbFontSize_SelectedIndexChanged (Index As Int)
Starter.TextSize=Starter.TextSizeMin+Index
function.setViewHeight(Root)
B4XPages.ShowPageAndRemovePreviousPages("MainPage")
B4XPages.ShowPage("Settings")
End Sub
What of This. Change the MainPage to Settings and remove the last line
B4X:
Sub cmbFontSize_SelectedIndexChanged (Index As Int)
Starter.TextSize=Starter.TextSizeMin+Index
function.setViewHeight(Root)
B4XPages.ShowPageAndRemovePreviousPages("Settings")
End Sub