|
@@ -158,13 +158,13 @@ public class CollapseCalculator {
|
158
|
158
|
private boolean calculateCanCollapse(float currentTopBarTranslation, float finalExpendedTranslation, float finalCollapsedTranslation) {
|
159
|
159
|
return currentTopBarTranslation > finalCollapsedTranslation &&
|
160
|
160
|
currentTopBarTranslation <= finalExpendedTranslation &&
|
161
|
|
- (scrollView.getScrollY() == 0 || (collapseBehaviour instanceof TitleBarHideOnScrollBehaviour || collapseBehaviour instanceof CollapseTitleBarBehaviour));
|
|
161
|
+ (scrollView.getScrollY() <= scaledTouchSlop || (collapseBehaviour instanceof TitleBarHideOnScrollBehaviour || collapseBehaviour instanceof CollapseTitleBarBehaviour));
|
162
|
162
|
}
|
163
|
163
|
|
164
|
164
|
private boolean calculateCanExpend(float currentTopBarTranslation, float finalExpendedTranslation, float finalCollapsedTranslation) {
|
165
|
165
|
return currentTopBarTranslation >= finalCollapsedTranslation &&
|
166
|
166
|
currentTopBarTranslation < finalExpendedTranslation &&
|
167
|
|
- (scrollView.getScrollY() == 0 || (collapseBehaviour instanceof TitleBarHideOnScrollBehaviour || collapseBehaviour instanceof CollapseTitleBarBehaviour));
|
|
167
|
+ (scrollView.getScrollY() <= scaledTouchSlop || (collapseBehaviour instanceof TitleBarHideOnScrollBehaviour || collapseBehaviour instanceof CollapseTitleBarBehaviour));
|
168
|
168
|
}
|
169
|
169
|
|
170
|
170
|
private boolean isCollapsedAndScrollingDown(Direction direction) {
|