Sunday, April 27, 2014

Set text size and color of PagerTitleStrip on ViewPager

Previous example show how to Implement PagerTitleStrip on ViewPager. In the onCreate() method, we get view of PagerTitleStrip (pagerTitleStrip) without using it. We can set text size and color of the PagerTitleStrip by calling its setTextSize() and setTextColor() methods.

  PagerTitleStrip pagerTitleStrip = (PagerTitleStrip)findViewById(;
  pagerTitleStrip.setTextSize(TypedValue.COMPLEX_UNIT_SP, 24);

on tablet

on phone

No comments: