Browse Source

Changed page NavBar and ReplyFab behaviors, removed topic's bottom padding.

pull/24/head
Apostolos Fanakis 8 years ago
parent
commit
38fbfaa402
  1. 3
      app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java
  2. 3
      app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java
  3. 1
      app/src/main/res/layout/activity_topic.xml

3
app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareFABBehavior.java

@ -41,8 +41,7 @@ public class ScrollAwareFABBehavior extends CoordinatorLayout.Behavior<FloatingA
fab.setVisibility(View.INVISIBLE); fab.setVisibility(View.INVISIBLE);
} }
}); });
} else if ((dyConsumed < 0 || (!target.canScrollVertically(1) && dyConsumed == 0 } else if (dyConsumed < 0 && child.getVisibility() != View.VISIBLE) {
&& dyUnconsumed > 40)) && child.getVisibility() != View.VISIBLE) {
child.show(); child.show();
} }
} }

3
app/src/main/java/gr/thmmy/mthmmy/utils/ScrollAwareLinearBehavior.java

@ -35,8 +35,7 @@ public class ScrollAwareLinearBehavior extends CoordinatorLayout.Behavior<View>
if ((dyConsumed > 0 || (!target.canScrollVertically(-1) && dyConsumed == 0 if ((dyConsumed > 0 || (!target.canScrollVertically(-1) && dyConsumed == 0
&& dyUnconsumed < 40)) && bottomNavBar.getVisibility() == View.VISIBLE) { && dyUnconsumed < 40)) && bottomNavBar.getVisibility() == View.VISIBLE) {
hide(bottomNavBar); hide(bottomNavBar);
} else if ((dyConsumed < 0 || (!target.canScrollVertically(1) && dyConsumed == 0 } else if (dyConsumed < 0 && bottomNavBar.getVisibility() != View.VISIBLE) {
&& dyUnconsumed > 40)) && bottomNavBar.getVisibility() != View.VISIBLE) {
show(bottomNavBar); show(bottomNavBar);
} }
} }

1
app/src/main/res/layout/activity_topic.xml

@ -39,7 +39,6 @@
android:layout_gravity="top|start" android:layout_gravity="top|start"
android:background="@color/background" android:background="@color/background"
android:paddingTop="4dp" android:paddingTop="4dp"
android:paddingBottom="54dp"
android:clipToPadding="false" android:clipToPadding="false"
android:scrollbars="none" android:scrollbars="none"
tools:context="gr.thmmy.mthmmy.activities.topic.TopicActivity" tools:context="gr.thmmy.mthmmy.activities.topic.TopicActivity"

Loading…
Cancel
Save