AppCompat and ViewPagerIndicator fragments submenu not showing
I have a pretty simple use case which does not work with the AppCompat
library on Android 8.
I have one Activity that includes two fragments that can be swipped
between using a TabPagerIndicator. The first of the fragments shows an
SubMenu on the ActionBar, the second does not.
When starting the activity the first fragment is shown. Clicking the
SubMenu correctly shows the SubMenu items for selection. However, if
swiping to fragment two and back again, clicking the SubMenu does nothing.
Instead of supplying large blocks of code here, I have created a sample
project that shows the problem. It is on github:
https://github.com/foens/appcompatsubmenu/
Shortcuts:
Activity code
Fragment with menu
Fragment without menu
Menu xml
Activity layout
What am I doing wrong?
No comments:
Post a Comment