tsteward Well-Known Member Licensed User Longtime User Jan 3, 2021 #1 I have an edittext on a panel in a tabstrip. I click on the edittext and the keyboard opens but the IME_HeightChanged never gets called Anything special I need to know when using tabstrip etc?
I have an edittext on a panel in a tabstrip. I click on the edittext and the keyboard opens but the IME_HeightChanged never gets called Anything special I need to know when using tabstrip etc?
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2021 #2 I don't think that it is related to TabStrip. Is this a full screen activity? Upvote 0
tsteward Well-Known Member Licensed User Longtime User Jan 3, 2021 #3 Erel said: I don't think that it is related to TabStrip. Is this a full screen activity? Click to expand... No its not #Region Activity Attributes #FullScreen: False #IncludeTitle: false #End Region Upvote 0
Erel said: I don't think that it is related to TabStrip. Is this a full screen activity? Click to expand... No its not #Region Activity Attributes #FullScreen: False #IncludeTitle: false #End Region
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2021 #4 Have you added the adjustResize flag: https://www.b4x.com/android/forum/threads/handle-the-soft-keyboard-with-the-ime-library.14832/ ? Upvote 0
Have you added the adjustResize flag: https://www.b4x.com/android/forum/threads/handle-the-soft-keyboard-with-the-ime-library.14832/ ?
tsteward Well-Known Member Licensed User Longtime User Jan 3, 2021 #5 Erel said: Have you added the adjustResize flag: https://www.b4x.com/android/forum/threads/handle-the-soft-keyboard-with-the-ime-library.14832/ ? Click to expand... Yep sure have. I have followed the tutorial exactly. Upvote 0
Erel said: Have you added the adjustResize flag: https://www.b4x.com/android/forum/threads/handle-the-soft-keyboard-with-the-ime-library.14832/ ? Click to expand... Yep sure have. I have followed the tutorial exactly.
M Mahares Expert Licensed User Longtime User Jan 3, 2021 #6 What code do you have in this sub: Sub IME_HeightChanged(NewHeight As Int,OldHeight As Int) Upvote 0
tsteward Well-Known Member Licensed User Longtime User Jan 3, 2021 #7 Mahares said: What code do you have in this sub: Sub IME_HeightChanged(NewHeight As Int,OldHeight As Int) Click to expand... At this stage I only have the following line of code but when run in debug mode I put a break point on that line and it never goes in there. B4X: Copy Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int) feedbackText.Top = NewHeight - feedbackText.Height End Sub Upvote 0
Mahares said: What code do you have in this sub: Sub IME_HeightChanged(NewHeight As Int,OldHeight As Int) Click to expand... At this stage I only have the following line of code but when run in debug mode I put a break point on that line and it never goes in there. B4X: Copy Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int) feedbackText.Top = NewHeight - feedbackText.Height End Sub
M Mahares Expert Licensed User Longtime User Jan 3, 2021 #8 tsteward said: At this stage I only have the following line of code Click to expand... Since the feedbackText edittext is a child of the panel, did you try this and still have issues. Code: Copy Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int) feedbackPanel.Top = NewHeight - feedbackPanel.Height End Sub Last edited: Jan 3, 2021 Upvote 0
tsteward said: At this stage I only have the following line of code Click to expand... Since the feedbackText edittext is a child of the panel, did you try this and still have issues. Code: Copy Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int) feedbackPanel.Top = NewHeight - feedbackPanel.Height End Sub
tsteward Well-Known Member Licensed User Longtime User Jan 3, 2021 #9 Mahares said: Since the feedbackText edittext is a child of the panel, did you try this and still have issues. Code: Copy Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int) feedbackPanel.Top = NewHeight - feedbackPanel.Height End Sub Click to expand... Made no difference Does manifest line to to be set for each activity? at the moment I have SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) But this is in a different activity. Should there be multiple entries for multiple activities? Upvote 0
Mahares said: Since the feedbackText edittext is a child of the panel, did you try this and still have issues. Code: Copy Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int) feedbackPanel.Top = NewHeight - feedbackPanel.Height End Sub Click to expand... Made no difference Does manifest line to to be set for each activity? at the moment I have SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) But this is in a different activity. Should there be multiple entries for multiple activities?
M Mahares Expert Licensed User Longtime User Jan 4, 2021 #10 tsteward said: But this is in a different activity. Should there be multiple entries for multiple activities? Click to expand... According to the below link:, Erel writes: Update: You should explicitly set the adjustSize mode with the manifest editor. This is done by adding the following manifest editor code (for each activity): Handle the soft keyboard with the IME library Android has very good support for custom input method editors (IMEs). The downside for this powerful feature is that interacting with the soft keyboard can be sometimes quite complicated. This library includes several utilities that will help you better handle the soft keyboard. The attached... www.b4x.com Upvote 0
tsteward said: But this is in a different activity. Should there be multiple entries for multiple activities? Click to expand... According to the below link:, Erel writes: Update: You should explicitly set the adjustSize mode with the manifest editor. This is done by adding the following manifest editor code (for each activity): Handle the soft keyboard with the IME library Android has very good support for custom input method editors (IMEs). The downside for this powerful feature is that interacting with the soft keyboard can be sometimes quite complicated. This library includes several utilities that will help you better handle the soft keyboard. The attached... www.b4x.com
tsteward Well-Known Member Licensed User Longtime User Jan 4, 2021 #11 I have added to manifest but still IME_HeightChanged event never gets called. Tried vehicleonly all lower case and didn't help B4X: Copy SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) SetActivityAttribute(VehicleOnly, android:windowSoftInputMode, adjustResize|stateHidden) Upvote 0
I have added to manifest but still IME_HeightChanged event never gets called. Tried vehicleonly all lower case and didn't help B4X: Copy SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden) SetActivityAttribute(VehicleOnly, android:windowSoftInputMode, adjustResize|stateHidden)
Erel B4X founder Staff member Licensed User Longtime User Jan 4, 2021 #12 Project with TabStrip + IME + B4XPages is attached. Works fine. Attachments Project.zip Project.zip 14.7 KB · Views: 463 Upvote 0
M Mahares Expert Licensed User Longtime User Jan 4, 2021 #13 Erel said: Project with TabStrip + IME + B4XPages is attached. Works fine. Click to expand... Erel, Are you sure you are not missing this line from the main activity in your posted project: Code: Copy B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight)) I am using B4A 10.2 unless you changed it in 10.5 Upvote 0
Erel said: Project with TabStrip + IME + B4XPages is attached. Works fine. Click to expand... Erel, Are you sure you are not missing this line from the main activity in your posted project: Code: Copy B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight)) I am using B4A 10.2 unless you changed it in 10.5
Erel B4X founder Staff member Licensed User Longtime User Jan 4, 2021 #14 Mahares said: Erel, Are you sure you are not missing this line from the main activity in your posted project: Click to expand... It is indeed missing if you want to handle the event in the top page. I just tested whether the event is actually raised. Upvote 0
Mahares said: Erel, Are you sure you are not missing this line from the main activity in your posted project: Click to expand... It is indeed missing if you want to handle the event in the top page. I just tested whether the event is actually raised.
M Mahares Expert Licensed User Longtime User Jan 5, 2021 #15 tsteward said: I have added to manifest but still IME_HeightChanged event never gets called. Tried vehicleonly all lower case and didn't help Click to expand... So what is the verdict with your issue. I tested Erel's project using B4XPages and it works. I created a similar project without the B4XPages method and it works. Can you please tell us if you solved it or not. When you receive help in the forum, you need to reciprocate by outlining your solution or accept the proposed solutions. Upvote 0
tsteward said: I have added to manifest but still IME_HeightChanged event never gets called. Tried vehicleonly all lower case and didn't help Click to expand... So what is the verdict with your issue. I tested Erel's project using B4XPages and it works. I created a similar project without the B4XPages method and it works. Can you please tell us if you solved it or not. When you receive help in the forum, you need to reciprocate by outlining your solution or accept the proposed solutions.
tsteward Well-Known Member Licensed User Longtime User Jan 5, 2021 #16 Mahares said: So what is the verdict with your issue. I tested Erel's project using B4XPages and it works. I created a similar project without the B4XPages method and it works. Can you please tell us if you solved it or not. When you receive help in the forum, you need to reciprocate by outlining your solution or accept the proposed solutions. Click to expand... Sorry if i'm not going fast enough for you but I have a job as well. No I have not solved the problem. It works in my main activity but still can't get it to work in sub activity. Hopefully I'll get time to work on it today. Thank you both for your help Upvote 0
Mahares said: So what is the verdict with your issue. I tested Erel's project using B4XPages and it works. I created a similar project without the B4XPages method and it works. Can you please tell us if you solved it or not. When you receive help in the forum, you need to reciprocate by outlining your solution or accept the proposed solutions. Click to expand... Sorry if i'm not going fast enough for you but I have a job as well. No I have not solved the problem. It works in my main activity but still can't get it to work in sub activity. Hopefully I'll get time to work on it today. Thank you both for your help
tsteward Well-Known Member Licensed User Longtime User Jan 6, 2021 #17 Okay I have no idea how to find my problem. Can I send my rather large and poorly written app to one of you two gentlemen privately so you can hopefully see the problem? Upvote 0
Okay I have no idea how to find my problem. Can I send my rather large and poorly written app to one of you two gentlemen privately so you can hopefully see the problem?
M Mahares Expert Licensed User Longtime User Jan 6, 2021 #18 tsteward said: Okay I have no idea how to find my problem Click to expand... I would rather not deal with private data, but I created a simple project for you that raises and lifts the edittext views and button above the keyboard when the focus shifts to the edittext(s) They are on a tabstripviewpager on the second activity other than main. I have tested it thoroughly on two devices and it works for me. I hope you can check it out and hope it sheds some light on your project. Attachments IMEtabstripViewPager.zip IMEtabstripViewPager.zip 14.3 KB · Views: 426 Upvote 0
tsteward said: Okay I have no idea how to find my problem Click to expand... I would rather not deal with private data, but I created a simple project for you that raises and lifts the edittext views and button above the keyboard when the focus shifts to the edittext(s) They are on a tabstripviewpager on the second activity other than main. I have tested it thoroughly on two devices and it works for me. I hope you can check it out and hope it sheds some light on your project.
tsteward Well-Known Member Licensed User Longtime User Jan 6, 2021 #19 Thank you I will look at it tomorrow. Otherwise I will knock up a sample with my poor coding practices (B4A allows hacks like me to write programs ) and see what happens. Upvote 0
Thank you I will look at it tomorrow. Otherwise I will knock up a sample with my poor coding practices (B4A allows hacks like me to write programs ) and see what happens.
tsteward Well-Known Member Licensed User Longtime User Jan 6, 2021 #20 Mahares said: I would rather not deal with private data, but I created a simple project for you that raises and lifts the edittext views and button above the keyboard when the focus shifts to the edittext(s) They are on a tabstripviewpager on the second activity other than main. I have tested it thoroughly on two devices and it works for me. I hope you can check it out and hope it sheds some light on your project. Click to expand... I have played with your example and added stuff to it etc all works perfectly. In my app the Sub IME_HeightChanged just never fires. So I figured something is interfering with it, and I went through my manifest file again and found I had this down lower SetActivityAttribute(vehicleonly, android:windowSoftInputMode, adjustResize|stateHidden) SetActivityAttribute(vehicleonly, android:windowSoftInputMode, "stateHidden|adjustPan") I don't know why..... Anyway removed the second entry and now IME_HeightChanged fires and I'm all smiles again Thank you for all your effort - Mark this mystery as solved. Upvote 0
Mahares said: I would rather not deal with private data, but I created a simple project for you that raises and lifts the edittext views and button above the keyboard when the focus shifts to the edittext(s) They are on a tabstripviewpager on the second activity other than main. I have tested it thoroughly on two devices and it works for me. I hope you can check it out and hope it sheds some light on your project. Click to expand... I have played with your example and added stuff to it etc all works perfectly. In my app the Sub IME_HeightChanged just never fires. So I figured something is interfering with it, and I went through my manifest file again and found I had this down lower SetActivityAttribute(vehicleonly, android:windowSoftInputMode, adjustResize|stateHidden) SetActivityAttribute(vehicleonly, android:windowSoftInputMode, "stateHidden|adjustPan") I don't know why..... Anyway removed the second entry and now IME_HeightChanged fires and I'm all smiles again Thank you for all your effort - Mark this mystery as solved.