Note: The Wearable Support Library classes under the android.support.wearable
package are subject to change. For the full Android API reference, see Reference.
java.lang.Object | ||
↳ | android.view.View | |
↳ | android.support.wearable.view.DotsPageIndicator |
A page indicator for GridViewPager
which identifies the current page in relation to all
available pages on the current row. Pages are represented as dots. The current page can be
highlighted with a different color or size dot.
The default behavior is to fade out the dots when the pager is idle (not settling or being
dragged). This can be changed with setDotFadeWhenIdle(boolean)
.
Use setPager(GridViewPager)
to connect this view to a pager instance.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.view.View
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.view.View
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns the color used for dots other than the selected page.
| |||||||||||
Returns the color of the dot for the selected page.
| |||||||||||
Returns the duration of the fade in duration, in milliseconds.
| |||||||||||
Sets the delay between the pager arriving at an idle state, and the fade out animation
beginning, in milliseconds.
| |||||||||||
Returns the duration of fade out animation, in milliseconds.
| |||||||||||
Indicates if the dots fade out when the pager is idle.
| |||||||||||
Gets the radius of the page dots.
| |||||||||||
Gets the radius of the page dot for the selected page.
| |||||||||||
Returns the color of the shadows drawn beneath the dots.
| |||||||||||
Returns the horizontal offset of shadows drawn beneath the dots.
| |||||||||||
Returns the vertical offset of shadows drawn beneath the dots.
| |||||||||||
Sets the pixel radius of shadows drawn beneath the dots.
| |||||||||||
Gets the center-to-center distance between page dots.
| |||||||||||
Called when the adapter is changed with
setAdapter(GridPagerAdapter) .
| |||||||||||
Called when a change is made to the content of the current adapter.
| |||||||||||
Called when the scroll state changes.
| |||||||||||
This method will be invoked when the current page is scrolled, either as part of a
programmatically initiated smooth scroll or a user initiated touch scroll.
| |||||||||||
This method is called when a new page becomes selected.
| |||||||||||
Sets the color used for dots other than the selected page.
| |||||||||||
Sets the color of the dot for the selected page.
| |||||||||||
Sets the duration of the fade in animation.
| |||||||||||
Sets the delay between the pager arriving at an idle state, and the fade out animation
beginning, in milliseconds.
| |||||||||||
Sets the duration of the fade out animation.
| |||||||||||
Sets whether the dots fade out when the pager is idle.
| |||||||||||
Sets the radius of the page dots.
| |||||||||||
Sets the radius of the page dot for the selected page.
| |||||||||||
Sets the color of the shadows drawn beneath the dots.
| |||||||||||
Sets the horizontal offset of shadows drawn beneath the dots.
| |||||||||||
Sets the vertical offset of shadows drawn beneath the dots.
| |||||||||||
Sets the pixel radius of shadows drawn beneath the dots.
| |||||||||||
Sets the center-to-center distance between page dots.
| |||||||||||
Sets a listener to receive the adapter change events that are provided to the page indicator.
| |||||||||||
Sets a listener to receive the page change events that are provided to the page indicator.
| |||||||||||
Supplies the GridViewPager instance, and attaches this views
GridViewPager.OnPageChangeListener and
GridViewPager.OnAdapterChangeListener listeners to the pager.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[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
android.support.wearable.view.GridViewPager.OnPageChangeListener
| |||||||||||
From interface
android.support.wearable.view.GridViewPager.OnAdapterChangeListener
|
Returns the color used for dots other than the selected page.
Returns the color of the dot for the selected page.
Returns the duration of the fade in duration, in milliseconds.
Sets the delay between the pager arriving at an idle state, and the fade out animation beginning, in milliseconds.
Returns the duration of fade out animation, in milliseconds.
Indicates if the dots fade out when the pager is idle.
Gets the radius of the page dots.
Gets the radius of the page dot for the selected page.
Returns the color of the shadows drawn beneath the dots.
Returns the horizontal offset of shadows drawn beneath the dots.
Returns the vertical offset of shadows drawn beneath the dots.
Sets the pixel radius of shadows drawn beneath the dots.
Gets the center-to-center distance between page dots.
Called when the adapter is changed with setAdapter(GridPagerAdapter)
.
Called when a change is made to the content of the current adapter.
Called when the scroll state changes. Useful for discovering when the user begins dragging, when the pager is automatically settling to the current page, or when it is fully stopped/idle.
state | The new scroll state. |
---|
This method will be invoked when the current page is scrolled, either as part of a programmatically initiated smooth scroll or a user initiated touch scroll.
row | Vertical position index of the new selected page row position+1 will be visible if positionOffset is nonzero |
---|---|
column | Horizontal position index of the new selected page |
rowOffset | Value from [0, 1) indicating the offset from the row |
columnOffset | Value from [0, 1) indicating the offset from the column |
rowOffsetPixels | Value in pixels indicating the offset from row |
columnOffsetPixels | Value in pixels indicating the offset from column |
This method is called when a new page becomes selected. The page may still be settling into final position.
row | Vertical position index of the new selected page |
---|---|
column | Horizontal position index of the new selected page |
Sets the color used for dots other than the selected page.
color | the color used for dots other than the selected page |
---|
Sets the color of the dot for the selected page.
color | the color of the dot for the selected page |
---|
Sets the duration of the fade in animation.
duration | the duration of the fade in animation |
---|
Sets the delay between the pager arriving at an idle state, and the fade out animation beginning, in milliseconds.
delay | the delay before the fade out animation begins, in milliseconds |
---|
Sets the duration of the fade out animation.
duration | the duration of the fade out animation |
---|
Sets whether the dots fade out when the pager is idle.
fade | whether the dots fade out when idle |
---|
Sets the radius of the page dots.
radius | the radius of the page dots |
---|
Sets the radius of the page dot for the selected page.
radius | the radius of the selected page dot |
---|
Sets the color of the shadows drawn beneath the dots.
color | the color of the shadows drawn beneath the dots |
---|
Sets the horizontal offset of shadows drawn beneath the dots.
dx | the horizontal offset of shadows drawn beneath the dots |
---|
Sets the vertical offset of shadows drawn beneath the dots.
dy | the vertical offset of shadows drawn beneath the dots |
---|
Sets the pixel radius of shadows drawn beneath the dots.
radius | the pixel radius of shadows rendered beneath the dots |
---|
Sets the center-to-center distance between page dots.
spacing | the distance between page dots |
---|
Sets a listener to receive the adapter change events that are provided to the page indicator. This allows an additional component to respond to these events without the need for additional code.
listener | the listener for adapter change events |
---|
Sets a listener to receive the page change events that are provided to the page indicator. This allows an additional component to respond to these events without the need for additional code.
listener | the listener for page change events |
---|
Supplies the GridViewPager instance, and attaches this views GridViewPager.OnPageChangeListener
and
GridViewPager.OnAdapterChangeListener
listeners to the pager.
pager | the pager for the page indicator |
---|