-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to addSubMenu ? #8
Comments
Let me see if I understand. You want to have the "refresh" action in the overflow menu instead of having it as an icon in the action bar? And you want the progress indicator to appear in the action bar when you click on the "refresh" menu item? In case your progress indicator is indeterminate you can do it quite easily without using my library, just do as this SO answer says: http://stackoverflow.com/a/9060543/244576 In case you need a determinate progress indicator like the one in my library (it looks like a pie), then let me know and I might consider adding support for that. In fact it's a possibility that had already crossed my mind. |
yeah ! i solve it by myself ! |
just like two menu switch ? the task start ,call your library and then call my action bar item when task finish! just call android api "invalidateOptionsMenu", and you can control the switch in the "onCreateOptionsMenu" method (return different action bar item) |
if you got it .please tell me! Thanks! |
hi man!
i mean how can i to add the menu item just like this 👍
SubMenu rootMenu = menu.addSubMenu("");
MenuItem rootMenuItem = rootMenu.getItem();
rootMenuItem.setIcon(R.drawable.actionbar_icon_overflow);
rootMenuItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
rootMenu.add(android.view.Menu.NONE, 1, android.view.Menu.NONE, "1");
rootMenu.add(android.view.Menu.NONE, 2, android.view.Menu.NONE, "2");
when i select "1",i need the top bar show progress ,just like your StyledActivity! ( mSaveButton.showProgress(true);)
The text was updated successfully, but these errors were encountered: