Android Question About “IME.AddHeightChangedEvent”

yzhy-mail

Member
I have two pages in my app,which will use “IME.AddHeightChangedEvent”.
I use these code in every page.
But I foud that ,for example,when I input text in page2,"HeightChangedEvent" works.Then it doesn't work in page3.
Close the app absolutely, and restar the app,I input text in page3 ,"HeightChangedEvent" works.Then it doesn't work in page2.
In a word,it just works in one page that you use it in the first time,and doesn't work in other pages.
Maybe you can give me some help.
Thank you very much !

code::
Sub Class_Globals
'some other code

 '''''

 Private IME As IME
'''

End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
'some other code

 '''''

    IME.Initialize("IME")
    IME.AddHeightChangedEvent
End Sub
private Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int)

    pnlToolbox.Top = NewHeight -pnlToolbox.Height
   
End Sub
 
Top