Android Question swiping in TabStrip

Sergey_New

Well-Known Member
Licensed User
Longtime User
How to prevent swiping of tabs in TabStrip?
 

mberthe

Member
Licensed User
Longtime User
A solution to temporarily block a page:

B4X:
sub globals
  .........
  Dim ip As Int  ' ip: selected page
  Dim ipagen As Boolean
  .......
end sub

' To block the page n
.......
  ip= n
  ipagen=True
  tabstrip1.scrollto (n,False)
........
  'page n "blocked" while running this part of code
.........  
  ipagen=False

Sub tabstrip1.pageselected (position As Int)
  If ipagen Then
    tabstrip1.scrollto (n,False)
    ip=n
  Else
    ip-position
  End If
End Sub
 
Upvote 0
Top