Stay organized with collections
Save and categorize content based on your preferences.
WearableListView.OnCenterProximityListener
public
static
interface
WearableListView.OnCenterProximityListener
android.support.wearable.view.WearableListView.OnCenterProximityListener
|
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 receiving callbacks when WearableListView children become or cease to be the
central item.
Summary
Public methods |
abstract
void
|
onCenterPosition(boolean animate)
Called when this view becomes central item of the WearableListView.
|
abstract
void
|
onNonCenterPosition(boolean animate)
Called when this view stops being the central item of the WearableListView.
|
Public methods
onCenterPosition
public abstract void onCenterPosition (boolean animate)
Called when this view becomes central item of the WearableListView.
Parameters |
animate |
boolean : Whether you should animate your transition of the View to become the central
item. If false, this is the initial setting and you should transition immediately.
|
onNonCenterPosition
public abstract void onNonCenterPosition (boolean animate)
Called when this view stops being the central item of the WearableListView.
Parameters |
animate |
boolean : Whether you should animate your transition of the View to being non central
item. If false, this is the initial setting and you should transition immediately.
|
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# WearableListView.OnCenterProximityListener\n==========================================\n\n\n`\npublic\nstatic\n\n\ninterface\nWearableListView.OnCenterProximityListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------------------------------|\n| android.support.wearable.view.WearableListView.OnCenterProximityListener |\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 receiving callbacks when WearableListView children become or cease to be the\ncentral item.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onCenterPosition](../../../../../reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html#onCenterPosition(boolean))`(boolean animate) ` Called when this view becomes central item of the WearableListView. |\n| ` abstract void` | ` `[onNonCenterPosition](../../../../../reference/android/support/wearable/view/WearableListView.OnCenterProximityListener.html#onNonCenterPosition(boolean))`(boolean animate) ` Called when this view stops being the central item of the WearableListView. |\n\nPublic methods\n--------------\n\n### onCenterPosition\n\n```\npublic abstract void onCenterPosition (boolean animate)\n```\n\nCalled when this view becomes central item of the WearableListView.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `animate` | `boolean`: Whether you should animate your transition of the View to become the central item. If false, this is the initial setting and you should transition immediately. \u003cbr /\u003e |\n\n### onNonCenterPosition\n\n```\npublic abstract void onNonCenterPosition (boolean animate)\n```\n\nCalled when this view stops being the central item of the WearableListView.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `animate` | `boolean`: Whether you should animate your transition of the View to being non central item. If false, this is the initial setting and you should transition immediately. \u003cbr /\u003e |"]]