Android Question IME_HeightChanged not happening

Arf

Well-Known Member
Licensed User
Longtime User
I'm trying to catch a keyboard disappear using IME, but the event never occurs. I've based the code on Erel's tutorial so I'm not sure why it's not happening.

Here are the relevant bits of code:
B4X:
Sub Globals
    Dim IME As IME
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("PatientsL")
    IME.Initialize("IME")
    IME.AddHeightChangedEvent
B4X:
Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
    If NewHeight > OldHeight Then
        unshiftScreen
    End If

I am also using the phone library to lock orientation to whatever orientation the activity started in, if that makes any difference.
 

Arf

Well-Known Member
Licensed User
Longtime User
Ah, it's because the method doesn't work in full screen mode.
Does anyone know of any workarounds?
I need to know when the keyboard comes and goes, and if I can determine the new available screen height, that would be fantastic.
 
Upvote 0
Top