@Override protected void onDetachedFromWindow() {
    super.onDetachedFromWindow();
    if (mPager != null) {
      updateAdapter(mPager.getAdapter(), null);
      mPager.setInternalPageChangeListener(null);
      mPager.setOnAdapterChangeListener(null);
      mPager = null;
    }
  }
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