B4A Class TabStripViewPagerExtendet

This is the TabStripViewPagerExtendet Class for the TabStripViewPager and my first Class which I publish.

The standard library does not offer much customizability and thats the reason why I did this class. The class has many settings and thanks to Erel for sharing methods with the JavaObjects.

Feel free to edit it, it is not perfect, but it works for @GeoffT660 (big thanks to you) and for me.

Alexander Stolte
Version: 1.01


  • IndicatorColor(tabstrip As TabStrip, color As Int)
  • IndicatorHeight(tabstrip As TabStrip, height As Int)
  • UnderlineColor(tabstrip As TabStrip, color As Int)
  • UnderlineHeight(tabstrip As TabStrip, height As Int)
  • DividerColor(tabstrip As TabStrip, color As Int)
  • GetAllTabLabels(tabstrip As TabStrip) As List
  • TabTextColor(tabstrip As TabStrip, colorSelected As Int , colorInactive As Int, Position As Int)
  • TabBackgroundColor(tabstrip As TabStrip, colorSelected As Int , colorInactive As Int, Position As Int)
  • ChangeTabText(tabstrip As TabStrip, text As String, Position As Int)
  • ChangeTabTextEllipsize(tabstrip As TabStrip, Ellipsize As String, Position As Int)
  • SetTypeFaces(tabstrip As TabStrip,TypeFaces As Typeface,Position As Int)
  • SetTextGravity(tabstrip As TabStrip,gravitys As Int,Position As Int)
  • SetTabHeight(tabstrip As TabStrip,height As Int,Position As Int)
  • SetTabLeft(tabstrip As TabStrip,left As Int,Position As Int)
  • SetTabPadding(tabstrip As TabStrip,padding() As Int,Position As Int)
  • SetTabSingleline(tabstrip As TabStrip,singleline As Boolean,Position As Int)
  • SetTabTag(tabstrip As TabStrip,Tag As Object,Position As Int)
  • GetTabTag(tabstrip As TabStrip, position As Int) As Object
  • TabTop(tabstrip As TabStrip,Top As Int,Position As Int)
  • TabWidth(tabstrip As TabStrip,Width As Int,Position As Int)
  • TabVisible(tabstrip As TabStrip,Visible As Boolean,Position As Int)
  • InsertPage (tabstrip As TabStrip, Index As Int, Page As Panel, Title As String)
  • RemovePage (tabstrip As TabStrip, Index As Int) As Panel
  • RefreshTabStrip(tabstrip As TabStrip)
  • CenterAllTabs(tabstrip As TabStrip, tabstripwidth As Int)

Example for the implementation:

Sub Process_Globals
    Dim tse As TabStripViewPagerExtendet
End Sub

Sub Globals
    Private TabStrip1 As TabStrip
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:

    tse.Initialize 'to Initialize the class



    tse.UnderlineColor(TabStrip1,Colors.Red) 'change the color of the underline by runtime

End Sub

I am available for any questions


  • TabStripViewPagerExtendet.bas
    8 KB · Views: 790
Last edited:

Guenter Becker

Active Member
Licensed User
gibt es eine Möglichkeit in einem Tab auch eine bitmap (nicht Material Font etc.) z.B. kleines PNG zusätzlich zum Text abzubilden?
Danke für die Rückmeldung und immer schöne Gesund bleiben.


Active Member
Licensed User
Longtime User

@Alexander Stolte
gibt es irgendwie die Möglichkeit das man die Größe des Anzeigebereichs abfragen kann ?
also höhe, breite des 'Content' Bereiches.