Android Question IME_HeightChanged never gets called (edittext on tabstip) - Solved

tsteward

Well-Known Member
Licensed User
Longtime User
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?
 

bl4ck4nt

Member
Licensed User
Longtime User
Project with TabStrip + IME + B4XPages is attached. Works fine.
I tried this sample and it was successful, but if edittext1 is moved to bottom then edittext1 is under the keyboard so it is not visible...
What do i need to add so that edittext1 can appear up the keyboard...?
 

Attachments

  • screenshot-1618472414120.jpg
    135.6 KB · Views: 127
  • screenshot-1618472437583.jpg
    29.4 KB · Views: 136
Upvote 0

Mahares

Expert
Licensed User
Longtime User
What do i need to add so that edittext1 can appear up the keyboard...?
In Main module put this code:
B4X:
Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int)
    B4XPages.GetManager.RaiseEvent(B4XPages.GetManager.GetTopPage, "IME_HeightChanged", Array(NewHeight, OldHeight))
    Log("IME_HeightChanged: " & NewHeight)
End Sub
And in B4XMainPage add this:
B4X:
Private edittext1 As EditText  'in class globals  or as B4XView
Sub IME_HeightChanged (NewHeight As Int, OldHeight As Int)
    edittext1.Top = NewHeight-edittext1.Height-50dip
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…