@Override
    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
      if (positionOffset > 0.5f) {
        // Consider ourselves to be on the next page when we're 50% of the way there.
        position++;
      }
      updateTextPositions(position, positionOffset, false);
    }
Set the {@link Gravity} used to position text within the title strip.
Only the vertical gravity component is used.

@param gravity {@link Gravity} constant for positioning title text
sample/src/main/java/android/support/v4/view/PagerTitleStripV22.java