Stay organized with collections
Save and categorize content based on your preferences.
WearableListView.OnCentralPositionChangedListener
public
static
interface
WearableListView.OnCentralPositionChangedListener
android.support.wearable.view.WearableListView.OnCentralPositionChangedListener
|
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
.
A listener interface that can be added to the WearableListView to get notified when the central
item is changed.
Summary
Public methods |
abstract
void
|
onCentralPositionChanged(int centralPosition)
Called when the central item of the WearableListView changes.
|
Public methods
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.
|
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.OnCentralPositionChangedListener\n=================================================\n\n\n`\npublic\nstatic\n\n\ninterface\nWearableListView.OnCentralPositionChangedListener\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------------------------------------|\n| android.support.wearable.view.WearableListView.OnCentralPositionChangedListener |\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\nA listener interface that can be added to the WearableListView to get notified when the central\nitem is changed.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onCentralPositionChanged](../../../../../reference/android/support/wearable/view/WearableListView.OnCentralPositionChangedListener.html#onCentralPositionChanged(int))`(int centralPosition) ` Called when the central item of the WearableListView changes. |\n\nPublic methods\n--------------\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 |"]]