Class DynamicFABUtils

java.lang.Object
com.pranavpandey.android.dynamic.support.util.DynamicFABUtils

public class DynamicFABUtils extends Object
Helper class to perform various FloatingActionButton operations.
  • Constructor Details

    • DynamicFABUtils

      public DynamicFABUtils()
  • Method Details

    • hide

      public static void hide(@Nullable FloatingActionButton fab)
      Same animation that FloatingActionButton.Behavior uses to hide the FAB when the AppBarLayout exits.
      Parameters:
      fab - The FAB to set hide animation.
    • hide

      public static void hide(@Nullable ExtendedFloatingActionButton extendedFab, boolean shrinkBefore)
      Same animation that FloatingActionButton.Behavior uses to hide the extended FAB when the AppBarLayout exits.
      Parameters:
      extendedFab - The extended FAB to set hide animation.
      shrinkBefore - true to shrink the FAB before hiding it.
    • show

      public static void show(@Nullable FloatingActionButton fab)
      Same animation that FloatingActionButton.Behavior uses to show the FAB when the AppBarLayout enters.
      Parameters:
      fab - The FAB to set show animation.
    • show

      public static void show(@Nullable ExtendedFloatingActionButton extendedFab, boolean extendAfter)
      Same animation that FloatingActionButton.Behavior uses to show the extended FAB when the AppBarLayout enters.
      Parameters:
      extendedFab - The FAB to set show animation.
      extendAfter - true to extend the FAB after showing it.