Android Code Snippet TabStripViewPager with FontAwesome / Material Icons


Step 1: Add a label named lblFontAwesome with the designer. Set its Typeface to FontAwesome and make it invisible.

Step 2: Use the code editor Icon Picker to add the icons (right click to find it):

TabStrip1.LoadLayout("Page1", "iOS " & Chr(0xF179))
TabStrip1.LoadLayout("Page2", "Android " & Chr(0xF17B))
TabStrip1.LoadLayout("Page3", "Windows " & Chr(0xF17A))
TabStrip1.LoadLayout("Page4", "" & Chr(0xF061))

Step 3: Set the typeface of the TabStrip header labels to FontAwesome:
For Each lbl As Label In GetAllTabLabels(TabStrip1)
   lbl.Typeface = Typeface.FONTAWESOME

Code for GetAllTabLabels is available here:
It depends on JavaObject and Reflection libraries.
Last edited:

Angel Garcia

Licensed User
Hi All,
Is there a way to measure the Label Height with fontawesome inside the TabStrip?, this is for adjust TextSize purposes.
I already tried with canvas and su multiline, but i always get a -1, i get correctly the Width after setting it.
I also tried to get the "tabsHeight" object of the tabstrip with no success.
Any ideas?
Thanks in advance!