Android Question Tabstripviewpager transparent background

apty

Active Member
Licensed User
Longtime User
How do i change the tabstripviewpager background color to be fully transparent? I have tried setting the alpha value to 0 in the designer but it still shows white background.
 

ilan

Expert
Licensed User
Longtime User
you need to change the label background color, something like this:

B4X:
Sub btn1_Click
    For Each v As View In GetAllTabLabels(TabStrip1)
       v.Width = 33%x
       Dim lbl As Label = v
       lbl.Color = Colors.Transparent
    Next  
End Sub  

Public Sub GetAllTabLabels (tabstrip As TabStrip) As List
   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)
   Next
   Return res
End Sub
 
Upvote 0

apty

Active Member
Licensed User
Longtime User
Thanks but it still shows white background. See screenshot below
 

Attachments

  • Screenshot_2016-12-29-19-22-14.jpeg
    Screenshot_2016-12-29-19-22-14.jpeg
    56.2 KB · Views: 197
Upvote 0

apty

Active Member
Licensed User
Longtime User
sorry i misunderstood the concepts of tabstrips. I managed to make it transparent by making the loaded layouts transparent
 
Upvote 0
Top