LucaMs Expert Licensed User Longtime User Nov 7, 2024 #1 I attach Erel's example, published by him in the thread dedicated to the IDE library, slightly modified by me. I only commented what was not necessary for this demonstration and moved EditText4 down. ime.Show(EditText4) shows the virtual keyboard but the Activity is not automatically moved up as it should. I also attached a project with the same layout but not a B4XPages project; same problem. Attachments IME_Example_Modified.zip IME_Example_Modified.zip 10.5 KB · Views: 378 IME_Example_No_B4XPages.zip IME_Example_No_B4XPages.zip 9.8 KB · Views: 374 Last edited: Nov 7, 2024
I attach Erel's example, published by him in the thread dedicated to the IDE library, slightly modified by me. I only commented what was not necessary for this demonstration and moved EditText4 down. ime.Show(EditText4) shows the virtual keyboard but the Activity is not automatically moved up as it should. I also attached a project with the same layout but not a B4XPages project; same problem.
LucaMs Expert Licensed User Longtime User Nov 7, 2024 #2 Progress: removing android:windowSoftInputMode from the Manifest, the NON-B4XPages project works as expected, the other project does not. Upvote 0
Progress: removing android:windowSoftInputMode from the Manifest, the NON-B4XPages project works as expected, the other project does not.
LucaMs Expert Licensed User Longtime User Nov 8, 2024 #3 Another project, without any line of code, not even in the Manifest, without IME library, just a layout with two B4XFloatTextField positioned near the bottom edge of the variant, works, the Activity automatically goes up. Upvote 0
Another project, without any line of code, not even in the Manifest, without IME library, just a layout with two B4XFloatTextField positioned near the bottom edge of the variant, works, the Activity automatically goes up.
Erel B4X founder Staff member Licensed User Longtime User Nov 10, 2024 #4 I've just tried the IME example: https://www.b4x.com/android/forum/t...-keyboard-with-the-ime-library.14832/#content It works. When the soft input mode is set to adjustResize then it is your responsibility to update the layout. This is done with this code: Code: Copy Private Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) btnHideKeyboard.Top = NewHeight - btnHideKeyboard.Height EditText1.Height = btnHideKeyboard.Top - EditText1.Top End Sub The other option is adjustPan. With adjustPan you let the OS handle it for you. Sometimes it works. Sometimes it doesn't. Upvote 0
I've just tried the IME example: https://www.b4x.com/android/forum/t...-keyboard-with-the-ime-library.14832/#content It works. When the soft input mode is set to adjustResize then it is your responsibility to update the layout. This is done with this code: Code: Copy Private Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int) btnHideKeyboard.Top = NewHeight - btnHideKeyboard.Height EditText1.Height = btnHideKeyboard.Top - EditText1.Top End Sub The other option is adjustPan. With adjustPan you let the OS handle it for you. Sometimes it works. Sometimes it doesn't.
LucaMs Expert Licensed User Longtime User Nov 10, 2024 #5 Erel said: Sometimes it works. Sometimes it doesn't. Click to expand... I guess it depends on the device. On my smartphone it is not even necessary to add adjustPan, the automatic scrolling happens without any addition to Manfest and without IME. But, as usual, it was not for me and on the device of another B4X member this does not happen. Since it is not possible to know a priori whether the automatic scrolling will happen, I will try a "nice" thing: a B4XDialog with B4XInputTemplate, positioned above the keyboard and temporarily moving the B4XFloatTextField in the dialog. Thanks Erel. Upvote 0
Erel said: Sometimes it works. Sometimes it doesn't. Click to expand... I guess it depends on the device. On my smartphone it is not even necessary to add adjustPan, the automatic scrolling happens without any addition to Manfest and without IME. But, as usual, it was not for me and on the device of another B4X member this does not happen. Since it is not possible to know a priori whether the automatic scrolling will happen, I will try a "nice" thing: a B4XDialog with B4XInputTemplate, positioned above the keyboard and temporarily moving the B4XFloatTextField in the dialog. Thanks Erel.
LucaMs Expert Licensed User Longtime User Nov 11, 2024 #6 Erel said: The other option is adjustPan. With adjustPan you let the OS handle it for you. Sometimes it works. Sometimes it doesn't. Click to expand... For those who still don't like B4XPages projects ... Due to the fact that in these projects the layout is in the Root panel, I solved by moving it up when necessary ("working" on ime_HeightChanged, ftf_FocusChanged (ftf = event name of B4XFloatTextFields), keeping the "current" FTF). Last edited: Nov 11, 2024 Upvote 0
Erel said: The other option is adjustPan. With adjustPan you let the OS handle it for you. Sometimes it works. Sometimes it doesn't. Click to expand... For those who still don't like B4XPages projects ... Due to the fact that in these projects the layout is in the Root panel, I solved by moving it up when necessary ("working" on ime_HeightChanged, ftf_FocusChanged (ftf = event name of B4XFloatTextFields), keeping the "current" FTF).