AlpVir Well-Known Member Licensed User Longtime User Dec 7, 2013 #1 How to catch the event that makes visible the soft keyboard ? The IME Library does not seem to fit the bill. If I have an app in portrait format and an EditText at the bottom, typing is not optimal (the EditText is hidden by the soft keyboard). It would be easy to temporarily move the EditText at the top, but it should intercept the event mentioned above. The following sub is also not optimal Code: Copy Sub EditText1_TextChanged (Old As String, New As String) '--- move EditText1 at the top EditText1.SetLayout (0dip,0dip,100%x,100%y) End Sub Thanks in advance.
How to catch the event that makes visible the soft keyboard ? The IME Library does not seem to fit the bill. If I have an app in portrait format and an EditText at the bottom, typing is not optimal (the EditText is hidden by the soft keyboard). It would be easy to temporarily move the EditText at the top, but it should intercept the event mentioned above. The following sub is also not optimal Code: Copy Sub EditText1_TextChanged (Old As String, New As String) '--- move EditText1 at the top EditText1.SetLayout (0dip,0dip,100%x,100%y) End Sub Thanks in advance.
LucaMs Expert Licensed User Longtime User Dec 7, 2013 #2 I do not know if this code is correct, but: Code: Copy IME1.Initialize("IME1") IME1.AddHeightChangedEvent '... Sub IME1_HeightChanged(NewHeight As Int, OldHeight As Int) ' NewHeight is the keyboard.top Dim KeyboardVisible As Boolean KeyboardVisible = (NewHeight < OldHeight) If Not(KeyboardVisible) Then ' Set here the EditText1 original top position Else If NewHeight < edtPrz.Top Then edtPrz.Top = NewHeight-EditText1.Height End If End If End Sub Upvote 0
I do not know if this code is correct, but: Code: Copy IME1.Initialize("IME1") IME1.AddHeightChangedEvent '... Sub IME1_HeightChanged(NewHeight As Int, OldHeight As Int) ' NewHeight is the keyboard.top Dim KeyboardVisible As Boolean KeyboardVisible = (NewHeight < OldHeight) If Not(KeyboardVisible) Then ' Set here the EditText1 original top position Else If NewHeight < edtPrz.Top Then edtPrz.Top = NewHeight-EditText1.Height End If End If End Sub
AlpVir Well-Known Member Licensed User Longtime User Dec 7, 2013 #3 The code does exactly what I wanted. Thank you very much ! Upvote 0
LucaMs Expert Licensed User Longtime User Dec 7, 2013 #4 AlpVir said: The code does exactly what I wanted. Thank you very much ! Click to expand... Upvote 0
merlin2049er Well-Known Member Licensed User Longtime User Aug 28, 2014 #5 Thanks, I've got the same problem. I'll try it out. Upvote 0
merlin2049er Well-Known Member Licensed User Longtime User Aug 28, 2014 #6 "try this line in the manifest editor: SetActivityAttribute(main, android:windowSoftInputMode, adjustPan|stateHidden)" tip from tds. Upvote 0
"try this line in the manifest editor: SetActivityAttribute(main, android:windowSoftInputMode, adjustPan|stateHidden)" tip from tds.
E EvgenyB4A Active Member Licensed User Longtime User Jun 26, 2015 #7 Hi Is it possible to hide the "Settings" button of the keyboard to prevent from user to change the keyboard settings? Upvote 0
Hi Is it possible to hide the "Settings" button of the keyboard to prevent from user to change the keyboard settings?
Erel B4X founder Staff member Licensed User Longtime User Jun 26, 2015 #8 You should have started a new thread for this question. It is not possible to disable the settings button. It is part of the keyboard. Upvote 0
You should have started a new thread for this question. It is not possible to disable the settings button. It is part of the keyboard.