Android Question Problems with TabStrip1 and IME

jose luis gudino

Active Member
Licensed User
Longtime User
hello everyone.
The problem is the following:

I'm using the IME library with the IME_HeightChanged event to detect keyboard activation and move an EditText to a position where I can type in it:
B4X:
EditText1.Top = NewHeight - EditText1.Height
So far everything works correctly but when I include the TabStrip library and call the tab generation
B4X:
TabStrip1.LoadLayout("Chats", " Chat ")
the EditText stops rising to the new position, I comment the line and again it starts working
B4X:
'TabStrip1.LoadLayout("Chats", " Chat ")
Commenting it starts working correctly

part of the code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
    IME.Initialize("IME")
    IME.AddHeightChangedEvent
    Activity.LoadLayout("Main")
    lupa = LoadBitmap(File.DirAssets, "search.png")
    camara = LoadBitmap(File.DirAssets, "camara.png")
    ToolbarHelper.Initialize
    ToolbarHelper.ShowUpIndicator = False 'set to true to show the up arro
   
    Dim cs As CSBuilder
    cs.Initialize.Size(19).Typeface(Typeface.LoadFromAssets("NeueHaasDisplay-Mediu.ttf")).Append("VamosApp Business").PopAll
    ACToolBarLight1.Title = cs
    ACToolBarLight1.SubTitle=""
    ACToolBarLight1.InitMenuListener
   

    TabStrip1.LoadLayout("Chats", Chr(0xF0C0))
    TabStrip1.LoadLayout("Chats", " Chat ")
    TabStrip1.LoadLayout("Estado", "Estados")
    TabStrip1.LoadLayout("Llamadas", "Llamadas")
End Sub

Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
    EditText1.Top = (NewHeight) - EditText1.Height
    Log(NewHeight)
End Sub

any solution

Thanks in advance
 

Mahares

Expert
Licensed User
Longtime User
any solution
Did you try to comment all these IME lines and don't use the IME stuff:
B4X:
'IME.Initialize("IME")
   ' IME.AddHeightChangedEvent
'Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
    'EditText1.Top = (NewHeight) - EditText1.Height
'End Sub
'Also comment he line in the manifest
In other words, do not use any of the IME stuff and see what happens. If that does not work for you, perhaps you can strip a small project and uploaded it. Somebody may lend you a hand. I have a tabstrip with an editetxt at the bottom of it and when I start typing in the editetxt, it rises. I am not using any of the IME height changed code. I don't know if we have similar cases.
 
Upvote 0

jose luis gudino

Active Member
Licensed User
Longtime User
Did you try to comment all these IME lines and don't use the IME stuff:
B4X:
'IME.Initialize("IME")
   ' IME.AddHeightChangedEvent
'Sub IME_HeightChanged(NewHeight As Int, OldHeight As Int)
    'EditText1.Top = (NewHeight) - EditText1.Height
'End Sub
'Also comment he line in the manifest
In other words, do not use any of the IME stuff and see what happens. If that does not work for you, perhaps you can strip a small project and uploaded it. Somebody may lend you a hand. I have a tabstrip with an editetxt at the bottom of it and when I start typing in the editetxt, it rises. I am not using any of the IME height changed code. I don't know if we have similar cases.
Hi, thanks for the help

Yes, but when I do that the screen scrolls up completely
 
Upvote 0
Top