-
-
Save virendersran01/302df0b9e798171c3c83a8d51f90b055 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
bottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() { | |
@Override | |
public void onStateChanged(View view, int i) { | |
// .. | |
// your code is here | |
} | |
@Override | |
public void onSlide(View view, float v) { | |
// .. | |
// animating the view on top of Bottom Sheet | |
yourView.animate().y(v <= 0 ? | |
view.getY() + mSheetBehavior.getPeekHeight() - yourView.getHeight() : | |
view.getHeight() - yourView.getHeight()).setDuration(0).start(); | |
} | |
}); | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment