Skip to content

Commit

Permalink
Fixed issue with addAction where index was not respected.
Browse files Browse the repository at this point in the history
  • Loading branch information
johannilsson committed May 31, 2011
1 parent caf4fa0 commit a77610f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionbar/src/com/markupartist/android/widget/ActionBar.java
Expand Up @@ -1034,12 +1034,12 @@ public void addAction(Action action, int index) {
if (!action.mActionBar.equals(this)) {
throw new IllegalStateException("Cannot add an action from a different action bar.");
}

if (action.mItemId == R.id.actionbar_item_home) {
mHomeView.removeAllViews();
mHomeView.addView(action.mView);
} else {
mActionsView.addView(action.mView);
mActionsView.addView(action.mView, index);
}
}

Expand Down

0 comments on commit a77610f

Please sign in to comment.