1

Is it possible to set the current item of a WearNavigationDrawer programmatically? I have two items that the user can swipe through to change the type of data displayed in the main view. I want the selection to persist after the app is closed (i.e. save the current selection with SharedPreference and select that item in onCreate).

I can see from the compiled code that WearableNavigationDrawer wraps around a private ViewPager. If I could access that, I could call setCurrentItem(int position). Is there anything short of creating a custom view? Switching pages programmatically seems like something WearNavigationDrawer should be able to do.

chanban
  • 480
  • 1
  • 4
  • 19
  • Please check https://stackoverflow.com/questions/31233279/navigation-drawer-how-do-i-set-the-selected-item-at-startup – Slava Kamzen Jul 07 '17 at 06:18

0 Answers0