public class

CirclePageIndicator

extends View
implements PageIndicator
java.lang.Object
   ↳ android.view.View
     ↳ com.viewpagerindicator.CirclePageIndicator

Class Overview

Draws circles (one for each view). The current view position is filled and others are only stroked.

Summary

Constants
int HORIZONTAL
int VERTICAL
[Expand]
Inherited Constants
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
CirclePageIndicator(Context context)
CirclePageIndicator(Context context, AttributeSet attrs)
CirclePageIndicator(Context context, AttributeSet attrs, int defStyle)
Public Methods
int getFillColor()
int getOrientation()
int getPageColor()
float getRadius()
int getStrokeColor()
float getStrokeWidth()
boolean isCentered()
boolean isSnap()
void notifyDataSetChanged()
Notify the indicator that the fragment list has changed.
void onPageScrollStateChanged(int state)
void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
void onPageSelected(int position)
void onRestoreInstanceState(Parcelable state)
Parcelable onSaveInstanceState()
boolean onTouchEvent(MotionEvent ev)
void setCentered(boolean centered)
void setCurrentItem(int item)

Set the current page of both the ViewPager and indicator.

void setFillColor(int fillColor)
void setOnPageChangeListener(ViewPager.OnPageChangeListener listener)
Set a page change listener which will receive forwarded events.
void setOrientation(int orientation)
void setPageColor(int pageColor)
void setRadius(float radius)
void setSnap(boolean snap)
void setStrokeColor(int strokeColor)
void setStrokeWidth(float strokeWidth)
void setViewPager(ViewPager view)
Bind the indicator to a ViewPager.
void setViewPager(ViewPager view, int initialPosition)
Bind the indicator to a ViewPager.
Protected Methods
void onDraw(Canvas canvas)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
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.accessibility.AccessibilityEventSource
From interface com.viewpagerindicator.PageIndicator

Constants

public static final int HORIZONTAL

Constant Value: 0 (0x00000000)

public static final int VERTICAL

Constant Value: 1 (0x00000001)

Public Constructors

public CirclePageIndicator (Context context)

public CirclePageIndicator (Context context, AttributeSet attrs)

public CirclePageIndicator (Context context, AttributeSet attrs, int defStyle)

Public Methods

public int getFillColor ()

public int getOrientation ()

public int getPageColor ()

public float getRadius ()

public int getStrokeColor ()

public float getStrokeWidth ()

public boolean isCentered ()

public boolean isSnap ()

public void notifyDataSetChanged ()

Notify the indicator that the fragment list has changed.

public void onPageScrollStateChanged (int state)

public void onPageScrolled (int position, float positionOffset, int positionOffsetPixels)

public void onPageSelected (int position)

public void onRestoreInstanceState (Parcelable state)

public Parcelable onSaveInstanceState ()

public boolean onTouchEvent (MotionEvent ev)

public void setCentered (boolean centered)

public void setCurrentItem (int item)

Set the current page of both the ViewPager and indicator.

This must be used if you need to set the page before the views are drawn on screen (e.g., default start page).

public void setFillColor (int fillColor)

public void setOnPageChangeListener (ViewPager.OnPageChangeListener listener)

Set a page change listener which will receive forwarded events.

public void setOrientation (int orientation)

public void setPageColor (int pageColor)

public void setRadius (float radius)

public void setSnap (boolean snap)

public void setStrokeColor (int strokeColor)

public void setStrokeWidth (float strokeWidth)

public void setViewPager (ViewPager view)

Bind the indicator to a ViewPager.

public void setViewPager (ViewPager view, int initialPosition)

Bind the indicator to a ViewPager.

Protected Methods

protected void onDraw (Canvas canvas)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)