Stay organized with collections
Save and categorize content based on your preferences.
WearableListView.ClickListener
public
static
interface
WearableListView.ClickListener
android.support.wearable.view.WearableListView.ClickListener
|
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 for click events on WearableListView.
Summary
Public methods
onClick
public abstract void onClick (WearableListView.ViewHolder view)
Called when the central child of the WearableListView is tapped.
Parameters |
view |
WearableListView.ViewHolder : View that was clicked.
|
onTopEmptyRegionClick
public abstract void onTopEmptyRegionClick ()
Called when the user taps the top third of the WearableListView and no item is present there.
This can happen when you are in initial state and the first, top-most item of the
WearableListView is centered.
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.ClickListener\n==============================\n\n\n`\npublic\nstatic\n\n\ninterface\nWearableListView.ClickListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------------------|\n| android.support.wearable.view.WearableListView.ClickListener |\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 for click events on WearableListView.\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onClick](../../../../../reference/android/support/wearable/view/WearableListView.ClickListener.html#onClick(android.support.wearable.view.WearableListView.ViewHolder))`(`[WearableListView.ViewHolder](../../../../../reference/android/support/wearable/view/WearableListView.ViewHolder.html)` view) ` Called when the central child of the WearableListView is tapped. |\n| ` abstract void` | ` `[onTopEmptyRegionClick](../../../../../reference/android/support/wearable/view/WearableListView.ClickListener.html#onTopEmptyRegionClick())`() ` Called when the user taps the top third of the WearableListView and no item is present there. |\n\nPublic methods\n--------------\n\n### onClick\n\n```\npublic abstract void onClick (WearableListView.ViewHolder view)\n```\n\nCalled when the central child of the WearableListView is tapped.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|--------------------------------------------------------------|\n| `view` | `WearableListView.ViewHolder`: View that was clicked. \u003cbr /\u003e |\n\n### onTopEmptyRegionClick\n\n```\npublic abstract void onTopEmptyRegionClick ()\n```\n\nCalled when the user taps the top third of the WearableListView and no item is present there.\nThis can happen when you are in initial state and the first, top-most item of the\nWearableListView is centered.\n\n\u003cbr /\u003e"]]