Android Question IME HeightChanged event problem

paragkini

Member
Licensed User
Longtime User
I want to use IME with bottomnavigation library and tried using
IME_HeightChanged (NewHeight As Int, OldHeight As Int) event.
But log says "Ignoring event: ime_heightchanged".
Any reason?
 

paragkini

Member
Licensed User
Longtime User
I checked in the log also. after I click on edittext and keyboard shows, activity is still active. its not paused neither resumed.

B4X:
Sub Globals
    Dim IME As IME
End Sub

Sub Activity_Create(FirstTime As Boolean)

  IME.Initialize("IME")
  Activity.LoadLayout("actAddNote")

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int)
    Log( NewHeight & ":" & OldHeight)
End Sub
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

paragkini

Member
Licensed User
Longtime User
Hi, I tried reading your response in different ways but couldn't understand. finally tried moving
B4X:
 IME.Initialize("IME")
to activity_resume. But still didn't work. pls bare with me :(

have also added
B4X:
 SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
in manifest.


{Update}
finally went through Erel's example on IME and went through the code line by line and found the problem.... Its working now.

Problem was I DID NOT ADD IME.AddHeightChangedEvent after IME.initialize.

Thanks for your help.
 
Last edited:
Upvote 0
Top