Description
Edit: This is with version 9.0.2.
This sequence of events:
- Start the app.
- Open the drawer, to which an
AccountHeaderView
has been attached. - Tap the account switcher arrow to show the list of account items.
- Leave the app (e.g., press Home button).
- Relaunch the app.
At this point I think the drawer reloads the saved state, which seems to include the state that the account menu is being shown instead of the regular menu.
This means calls like slider.getPosition(SOME_ITEM_ID)
return -1
instead of the actual position of SOME_ITEM_ID
in the main drawer.
Interestingly, in the same scenario slider.itemAdapter.getAdapterPosition(SOME_ITEM_ID)
does return a positive position (although it appears to be one less than the actual position).
Not sure if this is a bug, and slider.getPosition()
should not return -1
in this case, or if this is expected behaviour and there's some mechanism to "wait until the account switcher menu is closed, then update the main drawer items" on resume that I'm missing.