I tried to use the example from the CalcRelativeKeyboardHeight Example and found a strange bug there. If I call the keyboard, then everything moves up (this is how it should be), but now if I move the list up and call the keyboard again (by clicking on the TextView), then the list is accidentally scrolled. Perhaps the video will make it clearer:
CalcRelativeKeyboardHeight is not in xCustomListView, I also looked for solutions on the forum and found that you can do this:
It helps if I call the keyboard at the end of the CLV, but it doesn't make the keyboard stick to the TextView being edited.
How can I use xCustomListView to prevent the keyboard from closing the TextView when called? Also, everything is complicated by the fact that I want the keyboard to be hidden when I start scrolling through the list:
CalcRelativeKeyboardHeight is not in xCustomListView, I also looked for solutions on the forum and found that you can do this:
B4X:
Sub Page1_KeyboardStateChanged (Height As Float)
Dim p As View = clv.AsView.Parent.Parent
Dim rel As Int = p.CalcRelativeKeyboardHeight(Height)
If rel = 0 Then rel = clv.AsView.Height
clv.sv.Height = Min(rel, clv.AsView.Height)
End Sub
How can I use xCustomListView to prevent the keyboard from closing the TextView when called? Also, everything is complicated by the fact that I want the keyboard to be hidden when I start scrolling through the list:
B4X:
Private Sub clv_ScrollChanged (Offset As Int)
Page1.ResignFocus
End Sub