From 5b30f66f9346bba93acec99d17c7a87ef8cf9a47 Mon Sep 17 00:00:00 2001 From: Aurelien Hubert Date: Mon, 28 Mar 2016 20:11:57 +0200 Subject: Fixed warning check --- README.md | 1 - .../java/com/aurelhubert/ahbottomnavigation/AHBottomNavigation.java | 4 ++-- 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 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); -- cgit v1.2.3