|
|
@@ -38,8 +38,9 @@ public class CustomHeaderBehavior extends AppBarLayout.Behavior {
|
|
|
// Log.i("APP# CustomHeaderBehavior | onStartNestedScroll", "|" + " directTargetChild: " + directTargetChild);
|
|
|
// Log.i("APP# CustomHeaderBehavior | onStartNestedScroll", "|" + " target: " + target);
|
|
|
// Log.i("APP# CustomHeaderBehavior | onStartNestedScroll", "|" + " nestedScrollAxes: " + nestedScrollAxes);
|
|
|
- return super.onStartNestedScroll(parent, child, directTargetChild, target, nestedScrollAxes, type);
|
|
|
-// return false;
|
|
|
+// super.onStartNestedScroll(parent, child, directTargetChild, target, nestedScrollAxes, type);
|
|
|
+ // 항상 스크롤
|
|
|
+ return true;
|
|
|
}
|
|
|
|
|
|
private boolean isUp = false;
|
|
|
@@ -72,7 +73,9 @@ public class CustomHeaderBehavior extends AppBarLayout.Behavior {
|
|
|
if (Math.abs(dy) > 10) {
|
|
|
if (dy > 0 && isUp == false) {
|
|
|
isUp = true;
|
|
|
- ObjectAnimator animation = ObjectAnimator.ofFloat(child, "translationY", -child.getHeight() - ResourceUtil.getStatusBarHeightManual());
|
|
|
+ float ty = -child.getHeight() - ResourceUtil.getStatusBarHeightManual();
|
|
|
+// Log.i("APP# CustomHeaderBehavior | onNestedPreScroll", "|" + " ty --> " + ty);
|
|
|
+ ObjectAnimator animation = ObjectAnimator.ofFloat(child, "translationY", ty);
|
|
|
animation.setDuration(600);
|
|
|
animation.start();
|
|
|
}
|