diff --git a/README.md b/README.md
index 1bf1eea..fe077cb 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ dependencies {
Or Gradle Maven Central:
```groovy
-compile 'com.github.devlight.navigationtabbar:navigationtabbar:1.2.1'
+compile 'com.github.devlight.navigationtabbar:navigationtabbar:1.2.2'
```
Or Maven:
@@ -42,7 +42,7 @@ Or Maven:
com.github.devlight.navigationtabbar
navigationtabbar
- 1.2.1
+ 1.2.2
aar
```
diff --git a/app/build.gradle b/app/build.gradle
index f3d6bf2..197f286 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -22,7 +22,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':navigationtabbar')
- compile 'com.android.support:appcompat-v7:23.3.0'
- compile 'com.android.support:design:23.3.0'
- compile 'com.android.support:support-v4:23.3.0'
+ compile 'com.android.support:appcompat-v7:23.2.1'
+ compile 'com.android.support:design:23.2.1'
+ compile 'com.android.support:support-v4:23.2.1'
}
diff --git a/app/src/main/java/com/gigamole/navigationtabbar/HorizontalCoordinatorNtbActivity.java b/app/src/main/java/com/gigamole/navigationtabbar/HorizontalCoordinatorNtbActivity.java
index 46d679c..00eeae4 100644
--- a/app/src/main/java/com/gigamole/navigationtabbar/HorizontalCoordinatorNtbActivity.java
+++ b/app/src/main/java/com/gigamole/navigationtabbar/HorizontalCoordinatorNtbActivity.java
@@ -147,7 +147,7 @@ public void run() {
coordinatorLayout.postDelayed(new Runnable() {
@Override
public void run() {
- final Snackbar snackbar = Snackbar.make(coordinatorLayout, "Coordinator NTB", Snackbar.LENGTH_SHORT);
+ final Snackbar snackbar = Snackbar.make(navigationTabBar, "Coordinator NTB", Snackbar.LENGTH_SHORT);
snackbar.getView().setBackgroundColor(Color.parseColor("#9b92b3"));
((TextView) snackbar.getView().findViewById(R.id.snackbar_text))
.setTextColor(Color.parseColor("#423752"));
diff --git a/app/src/main/res/layout/activity_horizontal_coordinator_ntb.xml b/app/src/main/res/layout/activity_horizontal_coordinator_ntb.xml
index 3bed374..715c48f 100644
--- a/app/src/main/res/layout/activity_horizontal_coordinator_ntb.xml
+++ b/app/src/main/res/layout/activity_horizontal_coordinator_ntb.xml
@@ -53,18 +53,6 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
-
-
+
+
diff --git a/navigationtabbar/build.gradle b/navigationtabbar/build.gradle
index cbfb72e..1313156 100644
--- a/navigationtabbar/build.gradle
+++ b/navigationtabbar/build.gradle
@@ -19,7 +19,7 @@ apply plugin: "com.jfrog.bintray"
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'maven'
-version = "1.2.1"
+version = "1.2.2"
android {
compileSdkVersion 23
@@ -29,7 +29,7 @@ android {
minSdkVersion 11
targetSdkVersion 23
versionCode 1
- versionName "1.2.1"
+ versionName "1.2.2"
}
buildTypes {
release {
@@ -41,7 +41,7 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
- compile 'com.android.support:design:23.4.0'
+ compile 'com.android.support:design:23.2.1'
}
def siteUrl = 'https://github.com/DevLight-Mobile-Agency/NavigationTabBar'
diff --git a/navigationtabbar/src/main/java/com/gigamole/library/behavior/NavigationTabBarBehavior.java b/navigationtabbar/src/main/java/com/gigamole/library/behavior/NavigationTabBarBehavior.java
index 9d2ae82..e745cd1 100644
--- a/navigationtabbar/src/main/java/com/gigamole/library/behavior/NavigationTabBarBehavior.java
+++ b/navigationtabbar/src/main/java/com/gigamole/library/behavior/NavigationTabBarBehavior.java
@@ -71,7 +71,7 @@ public void onDependentViewRemoved(CoordinatorLayout parent, NavigationTabBar ch
@Override
public boolean layoutDependsOn(CoordinatorLayout parent, NavigationTabBar child, View dependency) {
updateSnackbar(child, dependency);
- updateFloatingActionButton(child, dependency);
+ updateFloatingActionButton(dependency);
return super.layoutDependsOn(parent, child, dependency);
}
@@ -264,7 +264,12 @@ public void onLayoutChange(View v, int left, int top, int right, int bottom,
if (mSnackbarHeight == -1) mSnackbarHeight = dependency.getHeight();
final int targetMargin = (int) (child.getBarHeight() - child.getTranslationY());
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) child.bringToFront();
+ child.bringToFront();
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ dependency.setStateListAnimator(null);
+ dependency.setElevation(0.0F);
+ }
+
if (dependency.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) {
final ViewGroup.MarginLayoutParams p =
(ViewGroup.MarginLayoutParams) dependency.getLayoutParams();
@@ -276,7 +281,7 @@ public void onLayoutChange(View v, int left, int top, int right, int bottom,
}
// Update floating action button bottom margin
- public void updateFloatingActionButton(final NavigationTabBar child, final View dependency) {
+ public void updateFloatingActionButton(final View dependency) {
if (dependency != null && dependency instanceof FloatingActionButton) {
mFloatingActionButton = (FloatingActionButton) dependency;