Hi,
I'm getting a problem with IME_HeightChanged event... in an Activity, I used
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) to maintain a textbox visible... but I noticed that I need to maintain other objects visible on the screen also... then I decided to capture IME event and measure the soft keyboard height in order to resize the screen objects.
I used the code:
But when I inserted the capture of IME event:
- The textbox is hidden by softkeyboard
- The event IME_HeightChanged isn't raised
As the event isn't raised it's not possible to resize or move the textbox or any other screen objects... before adding IME1.AddHeightChangedEvent the textbox were automatically moved to the top of softkeyboard (but I couldn't reallocate or resize any other screen object because I didn't have the event ... but after, no event, no move...)
any suggestion?
I'm getting a problem with IME_HeightChanged event... in an Activity, I used
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) to maintain a textbox visible... but I noticed that I need to maintain other objects visible on the screen also... then I decided to capture IME event and measure the soft keyboard height in order to resize the screen objects.
I used the code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
...
IME1.Initialize("IME")
IME1.AddHeightChangedEvent
...
Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
Log("softkeyboard " & NewHeight)
ToastMessageShow(NewHeight,True)
End Sub
But when I inserted the capture of IME event:
- The textbox is hidden by softkeyboard
- The event IME_HeightChanged isn't raised
As the event isn't raised it's not possible to resize or move the textbox or any other screen objects... before adding IME1.AddHeightChangedEvent the textbox were automatically moved to the top of softkeyboard (but I couldn't reallocate or resize any other screen object because I didn't have the event ... but after, no event, no move...)
any suggestion?