Skip to content
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

Crash if press "Remove action" when no button in ActionBar #45

Open
trietbui85 opened this issue Dec 30, 2011 · 0 comments
Open

Crash if press "Remove action" when no button in ActionBar #45

trietbui85 opened this issue Dec 30, 2011 · 0 comments

Comments

@trietbui85
Copy link

At first launch, I see there are 2 buttons in ActionBar.
I try to press "Remove Action" many times (> 2 times) and get a crash.

I found maybe because of OutOfBound exception in actionBar.removeActionAt(actionCount - 1);
removeAction.setOnClickListener(new OnClickListener() {
@OverRide
public void onClick(View view) {
int actionCount = actionBar.getActionCount();
actionBar.removeActionAt(actionCount - 1);
Toast.makeText(HomeActivity.this, "Removed action." , Toast.LENGTH_SHORT).show();
}
});
You should check if there is any button in ActionBar before remove it.

Cheers,
Btw, it's a great library. Thank your very much for your hard-working ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant