iOS Question [AsViewPager] Close keyboard with B4XPages

angel_

Well-Known Member
Licensed User
Longtime User
I use AsTabMenu and AsViewPager with B4XPages, how can I close the keyboard (if it is open) before sliding the panel or clicking the tab?
 

angel_

Well-Known Member
Licensed User
Longtime User
Thank you, I have this:
B4X:
Private Sub B4XPage_KeyboardStateChanged (Height As Float)
    '...'
    Dim EnabledViews As Boolean = (Height = 0)
    ASViewPager1.Scroll = EnabledViews
    ASTabMenu1.ViewEnable(EnabledViews)
End Sub

But this line it doesn't work when EnabledViews is true:

B4X:
ASTabMenu1.ViewEnable(EnabledViews)

Maybe a problem in this line:
B4X:
Public Sub ViewEnable(enable As Boolean)
    For i = 0 To xpnl_tabbase.NumberOfViews -1    
        #If B4I
        Dim tmp_pnl As Panel = xpnl_tabbase.GetView(i)
        'tmp_pnl.UserInteractionEnabled = False <-- this line
        tmp_pnl.UserInteractionEnabled = enable
        #Else
        xpnl_tabbase.GetView(i).Enabled = enable
        #End If
    Next
End Sub
 
Last edited:
Upvote 0
Top