Skip to content

Commit

Permalink
Update 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GIGAMOLE committed Jun 18, 2016
1 parent 6d7ddf2 commit 2cd3d9d
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -42,7 +42,7 @@ Or Maven:
<dependency>
<groupId>com.github.devlight.navigationtabbar</groupId>
<artifactId>navigationtabbar</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>
<type>aar</type>
</dependency>
```
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
24 changes: 12 additions & 12 deletions app/src/main/res/layout/activity_horizontal_coordinator_ntb.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="76dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:tint="#9f90af"
android:src="@drawable/ic_first"
app:backgroundTint="#605271"/>

<com.gigamole.library.ntb.NavigationTabBar
android:id="@+id/ntb_horizontal"
android:layout_width="match_parent"
Expand All @@ -79,4 +67,16 @@
app:ntb_badged="true"
app:ntb_typeface="fonts/agency.ttf"/>

<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_marginBottom="76dp"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:tint="#9f90af"
android:src="@drawable/ic_first"
app:backgroundTint="#605271"/>

</android.support.design.widget.CoordinatorLayout>
6 changes: 3 additions & 3 deletions navigationtabbar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -29,7 +29,7 @@ android {
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "1.2.1"
versionName "1.2.2"
}
buildTypes {
release {
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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();
Expand All @@ -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;

Expand Down

0 comments on commit 2cd3d9d

Please sign in to comment.