aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Hubert <aurel.hubert@gmail.com>2016-03-28 20:11:57 +0200
committerAurelien Hubert <aurel.hubert@gmail.com>2016-03-28 20:11:57 +0200
commit5b30f66f9346bba93acec99d17c7a87ef8cf9a47 (patch)
tree3e4ba04ba6300a8b0ed532606c5e73fcf6eb4a08
parent3f0423373f85e34643d0eb1aa76d926ee408a22e (diff)
downloadandroid_external_ahbottomnavigation-5b30f66f9346bba93acec99d17c7a87ef8cf9a47.tar.gz
android_external_ahbottomnavigation-5b30f66f9346bba93acec99d17c7a87ef8cf9a47.tar.bz2
android_external_ahbottomnavigation-5b30f66f9346bba93acec99d17c7a87ef8cf9a47.zip
Fixed warning check
-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);