WearableNavigationDrawer

public class WearableNavigationDrawer
extends WearableDrawerView

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ android.support.wearable.view.drawer.WearableDrawerView
           ↳ android.support.wearable.view.drawer.WearableNavigationDrawer


This class is deprecated.
use the android.support.wear.widget.drawer.WearableNavigationDrawerView provided by the Android Support Library Wear module instead.

Ease of use class for creating a Wearable navigation drawer. This can be used with WearableDrawerLayout to create a drawer for users to easily navigate a wearable app.

There are two ways this information may be presented: as a single page and as multiple pages. The single page navigation drawer will display 1-7 items to the user representing different navigation verticals. The multiple page navigation drawer will display 1 or more pages to the user, each representing different navigation verticals.

The developer may specify which style to use with the app:single_page custom attribute.

Summary

Nested classes

@interface WearableNavigationDrawer.NavigationStyle

Enumeration of possible drawer styles. 

class WearableNavigationDrawer.WearableNavigationDrawerAdapter

Adapter for specifying the contents of WearableNavigationDrawer. 

Inherited constants

From class android.view.ViewGroup
From class android.view.View

Inherited fields

From class android.view.View

Public constructors

WearableNavigationDrawer(Context context)
WearableNavigationDrawer(Context context, AttributeSet attrs)
WearableNavigationDrawer(Context context, AttributeSet attrs, int defStyleAttr)

Public methods

boolean canScrollHorizontally(int direction)
void onDrawerClosed()

Called when the drawer has settled in a completely closed state.

void onDrawerOpened()

Called when the drawer has settled in a completely open state.

boolean onInterceptTouchEvent(MotionEvent ev)
void setAdapter(WearableNavigationDrawer.WearableNavigationDrawerAdapter adapter)

Set a WearableNavigationDrawer.WearableNavigationDrawerAdapter that will supply data for this drawer.

void setCurrentItem(int index, boolean smoothScrollTo)

Changes which index is selected.

Inherited methods

From class android.support.wearable.view.drawer.WearableDrawerView
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.view.ViewParent
From interface android.view.ViewManager
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.accessibility.AccessibilityEventSource

Public constructors

WearableNavigationDrawer

WearableNavigationDrawer (Context context)

Parameters
context Context

WearableNavigationDrawer

WearableNavigationDrawer (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

WearableNavigationDrawer

WearableNavigationDrawer (Context context, 
                AttributeSet attrs, 
                int defStyleAttr)

Parameters
context Context

attrs AttributeSet

defStyleAttr int

Public methods

canScrollHorizontally

boolean canScrollHorizontally (int direction)

Parameters
direction int

Returns
boolean

onDrawerClosed

void onDrawerClosed ()

Called when the drawer has settled in a completely closed state. This is analogous to onDrawerClosed(View).

onDrawerOpened

void onDrawerOpened ()

Called when the drawer has settled in a completely open state. The drawer is interactive at this point. This is analogous to onDrawerOpened(View).

onInterceptTouchEvent

boolean onInterceptTouchEvent (MotionEvent ev)

Parameters
ev MotionEvent

Returns
boolean

setAdapter

void setAdapter (WearableNavigationDrawer.WearableNavigationDrawerAdapter adapter)

Set a WearableNavigationDrawer.WearableNavigationDrawerAdapter that will supply data for this drawer.

Parameters
adapter WearableNavigationDrawer.WearableNavigationDrawerAdapter

setCurrentItem

void setCurrentItem (int index, 
                boolean smoothScrollTo)

Changes which index is selected. onItemSelected(int) will be called when the specified index is reached, but it won't be called for items between the current index and the destination index.

Parameters
index int

smoothScrollTo boolean