Skip to content

Commit 2cd3d9d

Browse files
committed
Update 1.2.2
1 parent 6d7ddf2 commit 2cd3d9d

File tree

6 files changed

+29
-24
lines changed

6 files changed

+29
-24
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dependencies {
3333
Or Gradle Maven Central:
3434

3535
```groovy
36-
compile 'com.github.devlight.navigationtabbar:navigationtabbar:1.2.1'
36+
compile 'com.github.devlight.navigationtabbar:navigationtabbar:1.2.2'
3737
```
3838

3939
Or Maven:
@@ -42,7 +42,7 @@ Or Maven:
4242
<dependency>
4343
<groupId>com.github.devlight.navigationtabbar</groupId>
4444
<artifactId>navigationtabbar</artifactId>
45-
<version>1.2.1</version>
45+
<version>1.2.2</version>
4646
<type>aar</type>
4747
</dependency>
4848
```

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ android {
2222
dependencies {
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
compile project(':navigationtabbar')
25-
compile 'com.android.support:appcompat-v7:23.3.0'
26-
compile 'com.android.support:design:23.3.0'
27-
compile 'com.android.support:support-v4:23.3.0'
25+
compile 'com.android.support:appcompat-v7:23.2.1'
26+
compile 'com.android.support:design:23.2.1'
27+
compile 'com.android.support:support-v4:23.2.1'
2828
}

app/src/main/java/com/gigamole/navigationtabbar/HorizontalCoordinatorNtbActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public void run() {
147147
coordinatorLayout.postDelayed(new Runnable() {
148148
@Override
149149
public void run() {
150-
final Snackbar snackbar = Snackbar.make(coordinatorLayout, "Coordinator NTB", Snackbar.LENGTH_SHORT);
150+
final Snackbar snackbar = Snackbar.make(navigationTabBar, "Coordinator NTB", Snackbar.LENGTH_SHORT);
151151
snackbar.getView().setBackgroundColor(Color.parseColor("#9b92b3"));
152152
((TextView) snackbar.getView().findViewById(R.id.snackbar_text))
153153
.setTextColor(Color.parseColor("#423752"));

app/src/main/res/layout/activity_horizontal_coordinator_ntb.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,6 @@
5353
android:layout_height="match_parent"
5454
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
5555

56-
<android.support.design.widget.FloatingActionButton
57-
android:id="@+id/fab"
58-
android:layout_width="wrap_content"
59-
android:layout_height="wrap_content"
60-
android:layout_gravity="bottom|end"
61-
android:layout_marginBottom="76dp"
62-
android:layout_marginRight="16dp"
63-
android:layout_marginEnd="16dp"
64-
android:tint="#9f90af"
65-
android:src="@drawable/ic_first"
66-
app:backgroundTint="#605271"/>
67-
6856
<com.gigamole.library.ntb.NavigationTabBar
6957
android:id="@+id/ntb_horizontal"
7058
android:layout_width="match_parent"
@@ -79,4 +67,16 @@
7967
app:ntb_badged="true"
8068
app:ntb_typeface="fonts/agency.ttf"/>
8169

70+
<android.support.design.widget.FloatingActionButton
71+
android:id="@+id/fab"
72+
android:layout_width="wrap_content"
73+
android:layout_height="wrap_content"
74+
android:layout_gravity="bottom|end"
75+
android:layout_marginBottom="76dp"
76+
android:layout_marginRight="16dp"
77+
android:layout_marginEnd="16dp"
78+
android:tint="#9f90af"
79+
android:src="@drawable/ic_first"
80+
app:backgroundTint="#605271"/>
81+
8282
</android.support.design.widget.CoordinatorLayout>

navigationtabbar/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apply plugin: "com.jfrog.bintray"
1919
apply plugin: 'com.github.dcendents.android-maven'
2020
apply plugin: 'maven'
2121

22-
version = "1.2.1"
22+
version = "1.2.2"
2323

2424
android {
2525
compileSdkVersion 23
@@ -29,7 +29,7 @@ android {
2929
minSdkVersion 11
3030
targetSdkVersion 23
3131
versionCode 1
32-
versionName "1.2.1"
32+
versionName "1.2.2"
3333
}
3434
buildTypes {
3535
release {
@@ -41,7 +41,7 @@ android {
4141

4242
dependencies {
4343
compile fileTree(dir: 'libs', include: ['*.jar'])
44-
compile 'com.android.support:design:23.4.0'
44+
compile 'com.android.support:design:23.2.1'
4545
}
4646

4747
def siteUrl = 'https://github.com/DevLight-Mobile-Agency/NavigationTabBar'

navigationtabbar/src/main/java/com/gigamole/library/behavior/NavigationTabBarBehavior.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void onDependentViewRemoved(CoordinatorLayout parent, NavigationTabBar ch
7171
@Override
7272
public boolean layoutDependsOn(CoordinatorLayout parent, NavigationTabBar child, View dependency) {
7373
updateSnackbar(child, dependency);
74-
updateFloatingActionButton(child, dependency);
74+
updateFloatingActionButton(dependency);
7575
return super.layoutDependsOn(parent, child, dependency);
7676
}
7777

@@ -264,7 +264,12 @@ public void onLayoutChange(View v, int left, int top, int right, int bottom,
264264
if (mSnackbarHeight == -1) mSnackbarHeight = dependency.getHeight();
265265
final int targetMargin = (int) (child.getBarHeight() - child.getTranslationY());
266266

267-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) child.bringToFront();
267+
child.bringToFront();
268+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
269+
dependency.setStateListAnimator(null);
270+
dependency.setElevation(0.0F);
271+
}
272+
268273
if (dependency.getLayoutParams() instanceof ViewGroup.MarginLayoutParams) {
269274
final ViewGroup.MarginLayoutParams p =
270275
(ViewGroup.MarginLayoutParams) dependency.getLayoutParams();
@@ -276,7 +281,7 @@ public void onLayoutChange(View v, int left, int top, int right, int bottom,
276281
}
277282

278283
// Update floating action button bottom margin
279-
public void updateFloatingActionButton(final NavigationTabBar child, final View dependency) {
284+
public void updateFloatingActionButton(final View dependency) {
280285
if (dependency != null && dependency instanceof FloatingActionButton) {
281286
mFloatingActionButton = (FloatingActionButton) dependency;
282287

0 commit comments

Comments
 (0)