Stay organized with collections
Save and categorize content based on your preferences.
WearableNavigationDrawer.WearableNavigationDrawerAdapter
public
static
abstract
class
WearableNavigationDrawer.WearableNavigationDrawerAdapter
extends Object
java.lang.Object
|
↳ |
android.support.wearable.view.drawer.WearableNavigationDrawer.WearableNavigationDrawerAdapter
|
This class is deprecated.
use the androidx.wear.widget.drawer.WearableNavigationDrawerView
provided
by the Jetpack Wear library instead.
Adapter for specifying the contents of WearableNavigationDrawer.
Summary
Public methods |
abstract
int
|
getCount()
Returns the number of items in this adapter.
|
abstract
Drawable
|
getItemDrawable(int pos)
Get the drawable associated with the item at pos .
|
abstract
String
|
getItemText(int pos)
Get the text associated with the item at pos .
|
void
|
notifyDataSetChanged()
This method should be called by the application if the data backing this adapter has changed
and associated views should update.
|
abstract
void
|
onItemSelected(int pos)
Callback when the adapter switches to the item at pos .
|
Inherited methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
WearableNavigationDrawerAdapter
public WearableNavigationDrawerAdapter ()
Public methods
getCount
public abstract int getCount ()
Returns the number of items in this adapter.
getItemDrawable
public abstract Drawable getItemDrawable (int pos)
Get the drawable associated with the item at pos
.
getItemText
public abstract String getItemText (int pos)
Get the text associated with the item at pos
.
notifyDataSetChanged
public void notifyDataSetChanged ()
This method should be called by the application if the data backing this adapter has changed
and associated views should update.
onItemSelected
public abstract void onItemSelected (int pos)
Callback when the adapter switches to the item at pos
.
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,["# WearableNavigationDrawer.WearableNavigationDrawerAdapter\n\nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \n\nWearableNavigationDrawer.WearableNavigationDrawerAdapter\n========================================================\n\n\n`\npublic\nstatic\n\nabstract\nclass\nWearableNavigationDrawer.WearableNavigationDrawerAdapter\n`\n\n\n`\n\nextends `[Object](http://developer.android.com/reference/java/lang/Object.html)`\n\n\n`\n\n`\n\n\n`\n\n|---|-----------------------------------------------------------------------------------------------|\n| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||\n| ↳ | android.support.wearable.view.drawer.WearableNavigationDrawer.WearableNavigationDrawerAdapter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This class is deprecated.** \n\nuse the `androidx.wear.widget.drawer.WearableNavigationDrawerView` provided\nby the [Jetpack Wear](../../../../../../jetpack/androidx/releases/wear) library instead.\n\nAdapter for specifying the contents of WearableNavigationDrawer.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[WearableNavigationDrawerAdapter](../../../../../../reference/android/support/wearable/view/drawer/WearableNavigationDrawer.WearableNavigationDrawerAdapter.html#WearableNavigationDrawerAdapter())`() ` |\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract int` | ` `[getCount](../../../../../../reference/android/support/wearable/view/drawer/WearableNavigationDrawer.WearableNavigationDrawerAdapter.html#getCount())`() ` Returns the number of items in this adapter. |\n| ` abstract `[Drawable](http://developer.android.com/reference/android/graphics/drawable/Drawable.html) | ` `[getItemDrawable](../../../../../../reference/android/support/wearable/view/drawer/WearableNavigationDrawer.WearableNavigationDrawerAdapter.html#getItemDrawable(int))`(int pos) ` Get the drawable associated with the item at `pos`. |\n| ` abstract `[String](http://developer.android.com/reference/java/lang/String.html) | ` `[getItemText](../../../../../../reference/android/support/wearable/view/drawer/WearableNavigationDrawer.WearableNavigationDrawerAdapter.html#getItemText(int))`(int pos) ` Get the text associated with the item at `pos`. |\n| ` void` | ` `[notifyDataSetChanged](../../../../../../reference/android/support/wearable/view/drawer/WearableNavigationDrawer.WearableNavigationDrawerAdapter.html#notifyDataSetChanged())`() ` This method should be called by the application if the data backing this adapter has changed and associated views should update. |\n| ` abstract void` | ` `[onItemSelected](../../../../../../reference/android/support/wearable/view/drawer/WearableNavigationDrawer.WearableNavigationDrawerAdapter.html#onItemSelected(int))`(int pos) ` Callback when the adapter switches to the item at `pos`. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html) | ` clone() ` | | ` boolean` | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void` | ` finalize() ` | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` `[String](http://developer.android.com/reference/java/lang/String.html) | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### WearableNavigationDrawerAdapter\n\n```\npublic WearableNavigationDrawerAdapter ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getCount\n\n```\npublic abstract int getCount ()\n```\n\nReturns the number of items in this adapter.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getItemDrawable\n\n```\npublic abstract Drawable getItemDrawable (int pos)\n```\n\nGet the drawable associated with the item at `pos`.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|--------------|\n| `pos` | `int` \u003cbr /\u003e |\n\n| Returns ||\n|--------------------------------------------------------------------------------------------|--------|\n| [Drawable](http://developer.android.com/reference/android/graphics/drawable/Drawable.html) | \u003cbr /\u003e |\n\n### getItemText\n\n```\npublic abstract String getItemText (int pos)\n```\n\nGet the text associated with the item at `pos`.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|--------------|\n| `pos` | `int` \u003cbr /\u003e |\n\n| Returns ||\n|------------------------------------------------------------------------|--------|\n| [String](http://developer.android.com/reference/java/lang/String.html) | \u003cbr /\u003e |\n\n### notifyDataSetChanged\n\n```\npublic void notifyDataSetChanged ()\n```\n\nThis method should be called by the application if the data backing this adapter has changed\nand associated views should update.\n\n\u003cbr /\u003e\n\n### onItemSelected\n\n```\npublic abstract void onItemSelected (int pos)\n```\n\nCallback when the adapter switches to the item at `pos`.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------|--------------|\n| `pos` | `int` \u003cbr /\u003e |"]]