@ Override public void hide ( ) { // Only use scale animation if FAB is visible if ( getVisibility ( ) == View . VISIBLE ) { // Pivots indicate where the animation begins from float pivotX = getPivotX ( ) + getTranslationX ( ) ; float pivotY = getPivotY ( ) + getTranslationY ( ) ; // Animate FAB shrinking ScaleAnimation anim = new ScaleAnimation ( 1 , 0 , 1 , 0 , pivotX , pivotY ) ; anim . setDuration ( FAB_ANIM_DURATION ) ; anim . setInterpolator ( getInterpolator ( ) ) ; startAnimation ( anim ) ; } setVisibility ( View . INVISIBLE ) ; }
Hides the FAB .