Android Question the page title needs to change

vmag

Active Member
Hello.

The Page 2 page in the application can be opened several times
in one session and the page title needs to change
depending on the mode1 variable, but this only works the first
time.
xui.MsgboxAsync shows the correct value of the variable every time,
but the page title only changes when the page is opened for the first time
I tried changing the Label.Text - it doesn't work either

How to solve this problem?

code:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("Page2")
    xui.MsgboxAsync(Main.mode1,"MODE:")
    Select Case Main.mode1
        Case 1
            B4XPages.SetTitle(Me, "Mode 1")
        Case 2
            B4XPages.SetTitle(Me, "Mode 2")
        Case 3
            B4XPages.SetTitle(Me, "Mode 3")
        Case 4
            B4XPages.SetTitle(Me, "Mode 4")
    End Select
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…