Last active
          August 29, 2015 14:15 
        
      - 
      
- 
        Save mzgreen/dcc0b173f22fcec971ea to your computer and use it in GitHub Desktop. 
    HideOnScrollExample - MainActivity hide/show methods
  
        
  
    
      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
    
  
  
    
  | private void hideViews() { | |
| mToolbar.animate().translationY(-mToolbar.getHeight()).setInterpolator(new AccelerateInterpolator(2)); | |
| FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mFabButton.getLayoutParams(); | |
| int fabBottomMargin = lp.bottomMargin; | |
| mFabButton.animate().translationY(mFabButton.getHeight()+fabBottomMargin).setInterpolator(new AccelerateInterpolator(2)).start(); | |
| } | |
| private void showViews() { | |
| mToolbar.animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)); | |
| mFabButton.animate().translationY(0).setInterpolator(new DecelerateInterpolator(2)).start(); | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment