Skip to content

Commit

Permalink
Merge branch 'fix_set_items' of git://github.com/amenon/BottomBar int…
Browse files Browse the repository at this point in the history
…o amenon-fix_set_items

# Conflicts:
#	bottom-bar/src/main/java/com/roughike/bottombar/BottomBar.java
  • Loading branch information
roughike committed Jan 10, 2017
2 parents c8ad293 + 8de5579 commit 4b485ef
Show file tree
Hide file tree
Showing 2 changed files with 4,701 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ private void init(Context context, AttributeSet attrs) {
populateAttributes(context, attrs);
initializeViews();
determineInitialBackgroundColor();
if (tabXmlResource != 0) {
setItems(tabXmlResource);
}
}

private void populateAttributes(Context context, AttributeSet attrs) {
Expand Down Expand Up @@ -260,6 +263,7 @@ private void updateItems(final List<BottomBarTab> bottomBarItems) {
int index = 0;
int biggestWidth = 0;

tabContainer.removeAllViews();
BottomBarTab[] viewsToAdd = new BottomBarTab[bottomBarItems.size()];

for (BottomBarTab bottomBarTab : bottomBarItems) {
Expand Down Expand Up @@ -873,4 +877,4 @@ private void toggleShyVisibility(boolean visible) {
from.setHidden(this, visible);
}
}
}
}
Loading

0 comments on commit 4b485ef

Please sign in to comment.