Has anyone seen this? Feels like a bug in the Android MenuProvider.
- Activity A has menu items 1 & 2.
- Fragment A in Activity A has menu items 3 & 4. Menu items are in order: 1,2,3,4
- startActivity Activity B from Activity A
- close Activity B and resume Activity B
- The action bar menu now has menu items in order: 3,4,1,2 instead of 1,2,3,4
Lifecycle version 2.6.2 Nav version 2.7.5 AppCompat 1.6.1
I haven't seen any related bug report on b.android.com or question here.
I used the wrong version of addMenuProvider(). Don't use the one with a lifecycleowner and lifecycle state. Just use the single arg addMenuProvider() in your Activity.