public class

PagerTitleStripV22

extends ViewGroup
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.support.v4.view.PagerTitleStripV22
Known Direct Subclasses

Class Overview

Since v23 of the support library contain a layout bug we include the v22 of these files. https://code.google.com/p/android/issues/detail?id=184715&

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
PagerTitleStripV22(Context context)
PagerTitleStripV22(Context context, AttributeSet attrs)
Public Methods
int getTextSpacing()
void requestLayout()
void setGravity(int gravity)
Set the Gravity used to position text within the title strip.
void setNonPrimaryAlpha(float alpha)
Set the alpha value used for non-primary page titles.
void setTextColor(int color)
Set the color value used as the base color for all displayed page titles.
void setTextSize(int unit, float size)
Set the default text size to a given unit and value.
void setTextSpacing(int spacingPixels)
Set the required spacing between title segments.
Protected Methods
void onAttachedToWindow()
void onDetachedFromWindow()
void onLayout(boolean changed, int l, int t, int r, int b)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public PagerTitleStripV22 (Context context)

public PagerTitleStripV22 (Context context, AttributeSet attrs)

Public Methods

public int getTextSpacing ()

Returns
  • The required spacing between title segments in pixels

public void requestLayout ()

public void setGravity (int gravity)

Set the Gravity used to position text within the title strip. Only the vertical gravity component is used.

Parameters
gravity Gravity constant for positioning title text

public void setNonPrimaryAlpha (float alpha)

Set the alpha value used for non-primary page titles.

Parameters
alpha Opacity value in the range 0-1f

public void setTextColor (int color)

Set the color value used as the base color for all displayed page titles. Alpha will be ignored for non-primary page titles. See setNonPrimaryAlpha(float).

Parameters
color Color hex code in 0xAARRGGBB format

public void setTextSize (int unit, float size)

Set the default text size to a given unit and value. See TypedValue for the possible dimension units.

Example: to set the text size to 14px, use setTextSize(TypedValue.COMPLEX_UNIT_PX, 14);

Parameters
unit The desired dimension unit
size The desired size in the given units

public void setTextSpacing (int spacingPixels)

Set the required spacing between title segments.

Parameters
spacingPixels Spacing between each title displayed in pixels

Protected Methods

protected void onAttachedToWindow ()

protected void onDetachedFromWindow ()

protected void onLayout (boolean changed, int l, int t, int r, int b)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)