How to make ViewPager Title Strip Transparent or Semi Transluscent

The following shows what a PagerTitleStrip looks like when the alpha value is set to 0.5:

enter image description here

I expect the title to be translucent. Instead, as you can see, the title is not transparent at all. Even if I set the alpha value to 0, the title bar will simply decrease to the same background color of the view pager, but it still blocks the scroll below.

I programmatically moved the scrollview to align with the top, so the title bar does overlap over the scrollbar. Among the things I tried (individually):

titleStrip.setBackground(null)  // doesn't work
titleStrip.setAlpha(0)          // doesn't work
titleStrip.getBackground.setAlpha(0) // doesn't work

android:alpha="0.0"             // set in layout xml of title strip, doesn't work
android:visibility="invisible"  // this will give a solid background color

How can I make pagerTitleStrip have a transparent effect?

+4

All Articles