aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAurelien Hubert <aurel.hubert@gmail.com>2016-05-12 13:56:51 +0200
committerAurelien Hubert <aurel.hubert@gmail.com>2016-05-12 13:56:51 +0200
commit156dd474d13f45af609edfc6cbc046380162415b (patch)
tree47847c187384fb20b9cb1644e27a1197d7f229c3
parent860b8dbb50d3f3d9ad23ed9f2712a3fe2f4e13a5 (diff)
downloadandroid_external_ahbottomnavigation-156dd474d13f45af609edfc6cbc046380162415b.tar.gz
android_external_ahbottomnavigation-156dd474d13f45af609edfc6cbc046380162415b.tar.bz2
android_external_ahbottomnavigation-156dd474d13f45af609edfc6cbc046380162415b.zip
Updated Demo & Changelog
-rw-r--r--CHANGELOG.md13
-rw-r--r--demo/src/main/java/com/aurelhubert/ahbottomnavigation/demo/DemoActivity.java11
2 files changed, 19 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4d31cca..4eff3a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,17 @@
## Changelog
-### Newest version: 1.1.8
+### Newest version: 1.2.0
+
+* Updated Notification: now accept String (empty String to remove the notification)
+* Deprecated integer for Notification
+* Removed deprecated methods & interface for `AHBottomNavigationListener`
+* Fixed touch ripples when the bottom navigation is colored
+* Cleaned colors.xml to avoid conflicts
+* Removed constructor AHBottomNavigationItem()
+* Added `setTitleTextSize(float activeSize, float inactiveSize)`
+* Added `setNotificationMarginLeft(int activeMargin, int inactiveMargin)`
+
+### 1.1.8
* Added `hideBottomNavigation(boolean withAnimation)`
* Added `restoreBottomNavigation(boolean withAnimation)`
diff --git a/demo/src/main/java/com/aurelhubert/ahbottomnavigation/demo/DemoActivity.java b/demo/src/main/java/com/aurelhubert/ahbottomnavigation/demo/DemoActivity.java
index 1f7004f..877c9f0 100644
--- a/demo/src/main/java/com/aurelhubert/ahbottomnavigation/demo/DemoActivity.java
+++ b/demo/src/main/java/com/aurelhubert/ahbottomnavigation/demo/DemoActivity.java
@@ -10,6 +10,7 @@ import android.support.design.widget.Snackbar;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.animation.LinearOutSlowInInterpolator;
import android.support.v7.app.AppCompatActivity;
+import android.util.DisplayMetrics;
import android.view.View;
import android.view.animation.OvershootInterpolator;
@@ -52,14 +53,16 @@ public class DemoActivity extends AppCompatActivity {
bottomNavigation.addItems(bottomNavigationItems);
bottomNavigation.setAccentColor(Color.parseColor("#F63D2B"));
bottomNavigation.setInactiveColor(Color.parseColor("#747474"));
- bottomNavigation.setNotificationBackgroundColor(Color.parseColor("#F63D2B"));
+
+ DisplayMetrics dm = new DisplayMetrics();
+ getWindowManager().getDefaultDisplay().getMetrics(dm);
bottomNavigation.setOnTabSelectedListener(new AHBottomNavigation.OnTabSelectedListener() {
@Override
public void onTabSelected(int position, boolean wasSelected) {
if (position == 1) {
- bottomNavigation.setNotification(0, 1);
+ bottomNavigation.setNotification("", 1);
if (!wasSelected) {
floatingActionButton.setVisibility(View.VISIBLE);
@@ -151,7 +154,7 @@ public class DemoActivity extends AppCompatActivity {
handler.postDelayed(new Runnable() {
@Override
public void run() {
- bottomNavigation.setNotification(16, 1);
+ bottomNavigation.setNotification("16", 1);
Snackbar.make(bottomNavigation, "Snackbar with bottom navigation",
Snackbar.LENGTH_SHORT).show();
}
@@ -187,7 +190,7 @@ public class DemoActivity extends AppCompatActivity {
if (addItems) {
bottomNavigation.addItem(item4);
bottomNavigation.addItem(item5);
- bottomNavigation.setNotification(1, 3);
+ bottomNavigation.setNotification("1", 3);
} else {
bottomNavigation.removeAllItems();
bottomNavigation.addItems(bottomNavigationItems);