Android Question IME event issues with 2 pages

Scantech

Well-Known Member
Licensed User
Longtime User
See attached. 2 b4xpages, 2 different IME events with different names. click on edittext to trigger the IME event. Notice the B4XMainPage IME event gets triggered. I go to secondpage and B4XMainPage IME gets triggered??

What am i doing wrong here? I want 2 seperate IME with 2 different IME Events.

Samsung S21 Ultra
 

Attachments

  • IME Test.zip
    10.9 KB · Views: 36

walterf25

Expert
Licensed User
Longtime User
Take a look at the updated example attached, you were missing this part in the Main Activity
IME:
Sub Process_Globals
    Public ActionBarHomeClicked As Boolean
End Sub

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

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

Attachments

  • maptest2.zip
    11 KB · Views: 31
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…