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,["# WearableNavigationDrawerView.WearableNavigationDrawerAdapter\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:wear:28.0.0-alpha1 \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nWearableNavigationDrawerView.WearableNavigationDrawerAdapter\n============================================================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\nabstract\nclass\nWearableNavigationDrawerView.WearableNavigationDrawerAdapter\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|-------------------------------------------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.wear.widget.drawer.WearableNavigationDrawerView.WearableNavigationDrawerAdapter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nAdapter for specifying the contents of WearableNavigationDrawer.\n\nSummary\n-------\n\n| ### Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[WearableNavigationDrawerView.WearableNavigationDrawerAdapter](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.WearableNavigationDrawerAdapter#WearableNavigationDrawerView.WearableNavigationDrawerAdapter())`() ` |\n\n| ### Public methods ||\n|---------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract int` | ` `[getCount](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.WearableNavigationDrawerAdapter#getCount())`() ` Returns the number of items in this adapter. |\n| ` abstract `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | ` `[getItemDrawable](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.WearableNavigationDrawerAdapter#getItemDrawable(int))`(int pos) ` Get the drawable associated with the item at `pos`. |\n| ` abstract CharSequence` | ` `[getItemText](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.WearableNavigationDrawerAdapter#getItemText(int))`(int pos) ` Get the text associated with the item at `pos`. |\n| ` void` | ` `[notifyDataSetChanged](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.WearableNavigationDrawerAdapter#notifyDataSetChanged())`() ` This method should be called by the application if the data backing this adapter has changed and associated views should update. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` 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() ` | ||\n\nPublic constructors\n-------------------\n\n### WearableNavigationDrawerView.WearableNavigationDrawerAdapter\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nWearableNavigationDrawerView.WearableNavigationDrawerAdapter ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### getCount\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint 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\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nDrawable 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](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) | \u003cbr /\u003e |\n\n### getItemText\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nCharSequence 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| `CharSequence` | \u003cbr /\u003e |\n\n### notifyDataSetChanged\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid notifyDataSetChanged ()\n```\n\nThis method should be called by the application if the data backing this adapter has\nchanged and associated views should update.\n\n\u003cbr /\u003e\n\n-\n\n Interfaces\n ----------\n\n - [WearableNavigationDrawerView.OnItemSelectedListener](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.OnItemSelectedListener)\n-\n\n Classes\n -------\n\n - [WearableActionDrawerView](/reference/android/support/wear/widget/drawer/WearableActionDrawerView)\n - [WearableDrawerController](/reference/android/support/wear/widget/drawer/WearableDrawerController)\n - [WearableDrawerLayout](/reference/android/support/wear/widget/drawer/WearableDrawerLayout)\n - [WearableDrawerLayout.DrawerStateCallback](/reference/android/support/wear/widget/drawer/WearableDrawerLayout.DrawerStateCallback)\n - [WearableDrawerView](/reference/android/support/wear/widget/drawer/WearableDrawerView)\n - [WearableNavigationDrawerView](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView)\n - [WearableNavigationDrawerView.WearableNavigationDrawerAdapter](/reference/android/support/wear/widget/drawer/WearableNavigationDrawerView.WearableNavigationDrawerAdapter)"]]