I would like to synchronize the opening of my bottom sheet with a textfield on it, with the opening of the keyboard to create a smoother user experience.
I come across tutorials online that read and work with the following 2 objects:
Private Sub B4XPage_KeyboardStateChanged (Height As Float)
Dim ow As NativeObject
Dim duration As Int = ow.Initialize("B4IObjectWrapper").RunMethod("getMap:", Array(B4XPages.GetNativeParent(Me))) _
.RunMethod("objectForKey:", Array("animation_duration")).AsNumber * 1000
Log("duration in ms: " & duration)
Log("keyboard state changed: " & Height)
End Sub
This post presents an implementation of animations that animate alongside the iOS keyboard animation. Following the method in this post will allow your views to animate smoothly when the iOS keyboard shows and hides. A big thanks to @Erel who provided code to read the...