From e170c2d3e86a8f9bbdb84f1ad07cfbcfedc712cc Mon Sep 17 00:00:00 2001 From: Apostolof Date: Wed, 21 Dec 2016 16:40:36 +0200 Subject: [PATCH] ScrollAwareFABBehavior temporary fix. --- .../gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java | 11 +++++++++-- app/src/main/res/layout/activity_topic.xml | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java index fe760787..e910ecbd 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java @@ -3,6 +3,7 @@ package gr.thmmy.mthmmy.utils; import android.content.Context; import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.FloatingActionButton; +import android.support.v4.view.ViewCompat; import android.util.AttributeSet; import android.view.View; @@ -14,7 +15,7 @@ public class ScrollAwareFABBehavior extends CoordinatorLayout.Behavior 0 && child.getVisibility() == View.VISIBLE) { - child.hide(); + child.hide(new FloatingActionButton.OnVisibilityChangedListener() { + @Override + public void onHidden(FloatingActionButton fab) { + super.onHidden(fab); + fab.setVisibility(View.INVISIBLE); + } + }); } else if (dyConsumed < 0 && child.getVisibility() != View.VISIBLE) { child.show(); } diff --git a/app/src/main/res/layout/activity_topic.xml b/app/src/main/res/layout/activity_topic.xml index 4286fb03..49c45d92 100644 --- a/app/src/main/res/layout/activity_topic.xml +++ b/app/src/main/res/layout/activity_topic.xml @@ -21,7 +21,6 @@ android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" - android:transitionName="toolbar" app:popupTheme="@style/ToolbarTheme"> @@ -44,7 +43,6 @@ android:layout_height="50dp" android:layout_gravity="bottom|end" android:layout_marginTop="-2dp" - android:transitionName="bottom_navigation_bar" app:elevation="8dp">