aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java4
2 files changed, 2 insertions, 3 deletions
diff --git a/README.md b/README.md
index baf7900..59c97bf 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,6 @@ Library to implement the Bottom Navigation component from Material Design guidel
* Minimum SDK version: 14
## Features
-
* Follow the bottom navigation guidelines (https://www.google.com/design/spec/components/bottom-navigation.html)
* Add 3 to 5 items (with title, icon & color)
* Choose your style: Classic or colored navigation
diff --git a/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java b/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java
index a3fff0d..a03055c 100644
--- a/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java
+++ b/ahbottomnavigation/src/main/java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java
@@ -633,7 +633,7 @@ public class AHBottomNavigation extends FrameLayout {
* Add an item
*/
public void addItem(AHBottomNavigationItem item) {
- if (this.items.size() >= MAX_ITEMS) {
+ if (this.items.size() > MAX_ITEMS) {
Log.w(TAG, "The items list should not have more than 5 items");
}
items.add(item);
@@ -644,7 +644,7 @@ public class AHBottomNavigation extends FrameLayout {
* Add all items
*/
public void addItems(List<AHBottomNavigationItem> items) {
- if (items.size() >= MAX_ITEMS || (this.items.size() + items.size()) > MAX_ITEMS) {
+ if (items.size() > MAX_ITEMS || (this.items.size() + items.size()) > MAX_ITEMS) {
Log.w(TAG, "The items list should not have more than 5 items");
}
this.items.addAll(items);