Android Question B4XPages IME show/hide

tsteward

Well-Known Member
Licensed User
Longtime User
In this post Erel shows how to use the IME with B4XPages but how do I Show or Hide the keyboard in other pages when ime is declared as private?
It doesn't seem right to declare it again in subsequent pages.

Code included for ease of reading
B4X:
Sub Globals
    Private ime As IME
End Sub

Sub Activity_Create(FirstTime As Boolean)
    ime.Initialize("IME")
    ime.AddHeightChangedEvent
    Dim pm As B4XPagesManager
    pm.Initialize(Activity)
End Sub

Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int)
    B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight))
End Sub
 
Top