Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
TabStrip1.LoadLayout("lay0", "")
Dim cs1 As CSBuilder
cs1.Initialize
cs1.Image(LoadBitmap(File.DirAssets, "img_trash_yellow.png"), 40dip, 40dip, False).Append(CRLF).PopAll
Label1.Text = cs1
Dim l As Label = GetAllTabLabels(TabStrip1).Get(0) 'get(0) is 1st tab label, Get(1) will be the 2nd label
l.Text=cs1
End Sub
Public Sub GetAllTabLabels (tabstrip As TabStrip) As List 'need reflection and javaobjet libs
Dim jo As JavaObject = tabstrip
Dim r As Reflector
r.Target = jo.GetField("tabStrip")
Dim tc As Panel = r.GetField("tabsContainer")
Dim res As List
res.Initialize
For Each v As View In tc
If v Is Label Then res.Add(v)
If v.Tag Is Label Then res.Add(v.Tag)
Next
Return res
End Sub
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 " &...
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 " &...
www.b4x.com
Added this a few minutes later: Here is another example with 3 pages.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout")
Dim cs1 As CSBuilder
cs1.Initialize
cs1.Image(LoadBitmap(File.DirAssets, "img_trash_yellow.png"), 40dip, 40dip, False).Append(CRLF).PopAll
Label1.Text = cs1
TabStrip1.LoadLayout("lay0", "")
TabStrip1.LoadLayout("lay1", "")
TabStrip1.LoadLayout("lay2", "")
For Each l As Label In GetAllTabLabels(TabStrip1)
l.Text = cs1
Next
End Sub