Stay organized with collections
Save and categorize content based on your preferences.
public
static
interface
WearableListView.OnScrollListener
android.support.wearable.view.WearableListView.OnScrollListener
|
This interface is deprecated.
for centering and snapping your list items consider using the WearableRecyclerView
supported by a SnapHelper
or the LinearSnapHelper
.
For scaling and otherwise modifying the list items based on their location on the screen
consider using an WearableRecyclerView.ChildLayoutManager
or the CurvedChildLayoutManager
.
Interface for listening to WearableListView content scrolling.
Summary
Public methods |
abstract
void
|
onAbsoluteScrollChange(int scroll)
This method is deprecated.
BE ADVISED DO NOT USE THIS This might provide wrong values when contents of a
RecyclerView change.
|
abstract
void
|
onCentralPositionChanged(int centralPosition)
Called when the central item of the WearableListView changes.
|
abstract
void
|
onScroll(int scroll)
Called when the content is scrolled, reporting the relative scroll value.
|
abstract
void
|
onScrollStateChanged(int scrollState)
Called when WearableListView's scroll state changes.
|
Public methods
public abstract void onAbsoluteScrollChange (int scroll)
This method is deprecated.
BE ADVISED DO NOT USE THIS This might provide wrong values when contents of a
RecyclerView change.
Called when the content is scrolled, reporting the absolute scroll value.
Parameters |
scroll |
int : Absolute scroll position of the content inside the WearableListView.
|
onCentralPositionChanged
public abstract void onCentralPositionChanged (int centralPosition)
Called when the central item of the WearableListView changes.
Parameters |
centralPosition |
int : Position of the item in the Adapter.
|
public abstract void onScroll (int scroll)
Called when the content is scrolled, reporting the relative scroll value.
Parameters |
scroll |
int : Amount the content was scrolled. This is a delta from the previous position to
the new position.
|
public abstract void onScrollStateChanged (int scrollState)
Called when WearableListView's scroll state changes.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# WearableListView.OnScrollListener\n=================================\n\n\n`\npublic\nstatic\n\n\ninterface\nWearableListView.OnScrollListener\n`\n\n\n`\n\n\n`\n\n|-----------------------------------------------------------------|\n| android.support.wearable.view.WearableListView.OnScrollListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface is deprecated.** \n\nfor centering and snapping your list items consider using the [WearableRecyclerView](../../../../../reference/android/support/wearable/view/WearableRecyclerView.html) supported by a [SnapHelper](../../../../../reference/android/support/v7/widget/SnapHelper.html) or the [LinearSnapHelper](../../../../../reference/android/support/v7/widget/LinearSnapHelper.html).\nFor scaling and otherwise modifying the list items based on their location on the screen\nconsider using an [WearableRecyclerView.ChildLayoutManager](../../../../../reference/android/support/wearable/view/WearableRecyclerView.ChildLayoutManager.html) or the [CurvedChildLayoutManager](../../../../../reference/android/support/wearable/view/CurvedChildLayoutManager.html).\n\nInterface for listening to WearableListView content scrolling.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onAbsoluteScrollChange](../../../../../reference/android/support/wearable/view/WearableListView.OnScrollListener.html#onAbsoluteScrollChange(int))`(int scroll) ` *This method is deprecated. BE ADVISED DO NOT USE THIS This might provide wrong values when contents of a RecyclerView change.* |\n| ` abstract void` | ` `[onCentralPositionChanged](../../../../../reference/android/support/wearable/view/WearableListView.OnScrollListener.html#onCentralPositionChanged(int))`(int centralPosition) ` Called when the central item of the WearableListView changes. |\n| ` abstract void` | ` `[onScroll](../../../../../reference/android/support/wearable/view/WearableListView.OnScrollListener.html#onScroll(int))`(int scroll) ` Called when the content is scrolled, reporting the relative scroll value. |\n| ` abstract void` | ` `[onScrollStateChanged](../../../../../reference/android/support/wearable/view/WearableListView.OnScrollListener.html#onScrollStateChanged(int))`(int scrollState) ` Called when WearableListView's scroll state changes. |\n\nPublic methods\n--------------\n\n### onAbsoluteScrollChange\n\n```\npublic abstract void onAbsoluteScrollChange (int scroll)\n```\n\n\n**This method is deprecated.** \n\nBE ADVISED DO NOT USE THIS This might provide wrong values when contents of a\nRecyclerView change.\n\nCalled when the content is scrolled, reporting the absolute scroll value.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------|\n| `scroll` | `int`: Absolute scroll position of the content inside the WearableListView. \u003cbr /\u003e |\n\n### onCentralPositionChanged\n\n```\npublic abstract void onCentralPositionChanged (int centralPosition)\n```\n\nCalled when the central item of the WearableListView changes.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------------|----------------------------------------------------|\n| `centralPosition` | `int`: Position of the item in the Adapter. \u003cbr /\u003e |\n\n### onScroll\n\n```\npublic abstract void onScroll (int scroll)\n```\n\nCalled when the content is scrolled, reporting the relative scroll value.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------------|\n| `scroll` | `int`: Amount the content was scrolled. This is a delta from the previous position to the new position. \u003cbr /\u003e |\n\n### onScrollStateChanged\n\n```\npublic abstract void onScrollStateChanged (int scrollState)\n```\n\nCalled when WearableListView's scroll state changes.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `scrollState` | `int`: The updated scroll state. One of [RecyclerView.SCROLL_STATE_IDLE](../../../../../reference/android/support/v7/widget/RecyclerView.html#SCROLL_STATE_IDLE), [RecyclerView.SCROLL_STATE_DRAGGING](../../../../../reference/android/support/v7/widget/RecyclerView.html#SCROLL_STATE_DRAGGING) or [RecyclerView.SCROLL_STATE_SETTLING](../../../../../reference/android/support/v7/widget/RecyclerView.html#SCROLL_STATE_SETTLING). \u003cbr /\u003e |"]]