We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The example crashes when the user is trying to remove the action bar when no action bar is shown (All them have been removed).
To fix this, when the user is removing, the number of the actions in the action bar should be checked:
case (R.id.remove_action): { int actionCount = actionBar.getActionCount(); if (actionCount > 0) { actionBar.removeActionAt(actionCount - 1); Toast.makeText(HomeActivity.this, "Removed action." , Toast.LENGTH_SHORT).show(); } break;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The example crashes when the user is trying to remove the action bar when no action bar is shown (All them have been removed).
To fix this, when the user is removing, the number of the actions in the action bar should be checked:
The text was updated successfully, but these errors were encountered: