Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5760ddc authored by Nancy Chen's avatar Nancy Chen Committed by android-build-merger
Browse files

Merge "Implement FloatingActionButton.Behavior method correctly." into ub-contactsdialer-b-dev

am: c9287203

* commit 'c9287203':
  Implement FloatingActionButton.Behavior method correctly.
parents 870fd5b0 c9287203
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -34,17 +34,14 @@ public class FloatingActionButtonBehavior extends CoordinatorLayout.Behavior<Fra

    @Override
    public boolean layoutDependsOn(CoordinatorLayout parent, FrameLayout child, View dependency) {
        // This needs to return true to trigger the callback correctly.
        return true;
        return dependency instanceof SnackbarLayout;
    }

    @Override
    public boolean onDependentViewChanged(CoordinatorLayout parent, FrameLayout child,
            View dependency) {
        if (dependency instanceof SnackbarLayout) {
        float translationY = Math.min(0, dependency.getTranslationY() - dependency.getHeight());
        child.setTranslationY(translationY);
        }
        return true;
    }
}