iOS Question Shift text field up above the keyboard

PSEAD

Member
Licensed User
Longtime User
Is there any way to scroll the screen upwards to keep the text fields visible when editing?
 

PSEAD

Member
Licensed User
Longtime User
Thanks
I did a work-around by placing everything on a panel and shifting the panel.top when entering the text field. I seems to work ok.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
There is now a new KeyboardStateChanged event:
B4X:
Sub Page1_KeyboardStateChanged (Height As Float)
   Log("Current keyboard height: " & Height)
End Sub
It will not be listed in the IDE until the next update, but it should work.
It fires when the keyboard is shown or hidden (height = 0) and the page is currently visible.
 
Upvote 0

PSEAD

Member
Licensed User
Longtime User
I have tried this, and the problem is that when the "keyboardstatechanged" event is fired, the "beginedit" event is not fired.
If the keyboard state does not change (i.e. it is already visible), then the "beginedit" event fires correctly.
 
Upvote 0

PSEAD

Member
Licensed User
Longtime User
Ok, I found the problem. Both events do fire, except if you have a debugger breakpoint in the "keyboardstatechanged" event.
 
Upvote 0
Top