Since SplitActionBar is no longer supported in Android 5.0, I am trying to use an ActionMenuView to achieve a SplitActionBar effect. But I could not find much information on how to use ActionMenuView.
I know I can add a ActionMenuView in the layout file, but I don't know how to add menu items. It doesn't seem like I could inflate them like I do with SplitActionBar.
Could you give some sample code on how to use ActonMenuView? Thanks!
Getting
ActionMenuViewto display a whole screen's width of icons is a chore. Here is an example to do what you want. Make sure yourActionMenuViewXML item iswrap_contentfor height and width, thengravityto the right. Surround it in aLinearLayoutwhich takes the whole width and provides background color.Use this code to initialize the
ActionMenuView(obviously you will need to change the button callbacks)For what it's worth, I had to read the support library source code for 8 hours to get this to work. The documentation is garbage.