iOS Question KeyboardStateChanged not fired on secondary page

marcick

Well-Known Member
Licensed User
Longtime User
I'm using this tutorial to separate all my code in different modules and make it more readable

https://www.b4x.com/android/forum/threads/multiple-pages-example.48170/#content

But it seems to me that the KeyboardStateChanged event is fired only in the main page.
I have of course the event declared in the secondary pages and with the correct name, but it is never fired.
Because I have some TextFields in the secondary pages, I'm not able to move them over the keyoboard.

I include a sample project where I can't get the event fired on page2
 

Attachments

  • prova.zip
    4 KB · Views: 173
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
Public Sub Show
   If pg.IsInitialized = False Then
     pg.Initialize("Page2")
     pg.Title = "Page2"
     pg.RootPanel.Color = Colors.black
     pg.RootPanel.LoadLayout("Page2")     
   End If
   Main.NavControl.ShowPage(pg)
   Main.NavControl.NavigationBarVisible=True
   Main.NavControl.ToolBarVisible=True
End Sub


Sub pg_KeyboardStateChanged (Height As Float)
   Log("keyboard fired")
End Sub
You have set the 'event name" to page2. This means that the sub should be: page2_KeyboardStateChanged.
 
Upvote 0
Top