From 38fbfaa4026f1bb204c25d68a4ee69c6d47e66b1 Mon Sep 17 00:00:00 2001 From: Apostolof Date: Sat, 22 Jul 2017 17:47:21 +0300 Subject: [PATCH] Changed page NavBar and ReplyFab behaviors, removed topic's bottom padding. --- .../java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java | 3 +-- .../java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java | 3 +-- app/src/main/res/layout/activity_topic.xml | 1 - 3 files changed, 2 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 58ba1a62..f49fe28d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java @@ -41,8 +41,7 @@ public class ScrollAwareFABBehavior extends CoordinatorLayout.Behavior 40)) && child.getVisibility() != View.VISIBLE) { + } else if (dyConsumed < 0 && child.getVisibility() != View.VISIBLE) { child.show(); } } diff --git a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java index 0f3564c6..834cbe34 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java +++ b/app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java @@ -35,8 +35,7 @@ public class ScrollAwareLinearBehavior extends CoordinatorLayout.Behavior if ((dyConsumed > 0 || (!target.canScrollVertically(-1) && dyConsumed == 0 && dyUnconsumed < 40)) && bottomNavBar.getVisibility() == View.VISIBLE) { hide(bottomNavBar); - } else if ((dyConsumed < 0 || (!target.canScrollVertically(1) && dyConsumed == 0 - && dyUnconsumed > 40)) && bottomNavBar.getVisibility() != View.VISIBLE) { + } else if (dyConsumed < 0 && bottomNavBar.getVisibility() != View.VISIBLE) { show(bottomNavBar); } } diff --git a/app/src/main/res/layout/activity_topic.xml b/app/src/main/res/layout/activity_topic.xml index 27f9b6b1..e726d372 100644 --- a/app/src/main/res/layout/activity_topic.xml +++ b/app/src/main/res/layout/activity_topic.xml @@ -39,7 +39,6 @@ android:layout_gravity="top|start" android:background="@color/background" android:paddingTop="4dp" - android:paddingBottom="54dp" android:clipToPadding="false" android:scrollbars="none" tools:context="gr.thmmy.mthmmy.activities.topic.TopicActivity"