I am using a fragment pager adapter for two tabs, based almost identically on the code from the Sliding Tabs Basic sdk sample. All was working fine until I tried to swap out the action bar for the tool bar. I had to switch up my theme to light, and now I've noticed that the tabs were using a transparent default colour. I want my tabs to be the same colour as the tool bar, but in setting the colour, they are obscuring the sliding tab strip indicator completely. What is the correct way to push the SlidingTabStrip to the front?
- I've tried setting the background resource of the tab programmatically rather than via the
selectableItemBackground
theme property. The background still obscures the indicators. - I've tried to
bringToFront()
orbringChildToFront()
the SlidingTabStrip in multiple places, (it is created in the constructor of the SlidingTabLayout). I've tried it after the for loop inSlidingTabLayout.populateTabStrip()
which seems sensible as this is where the tab views are created.
I wonder why no-one else has had this issue ?!