Class DynamicMenuUtils

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

public class DynamicMenuUtils extends Object
Helper class to tint and perform operations on toolbar menu.
See Also:
  • Constructor Details

    • DynamicMenuUtils

      public DynamicMenuUtils()
  • Method Details

    • forceMenuIcons

      public static void forceMenuIcons(@Nullable Menu menu)
      Set the menu to show MenuItem icons in the overflow window.
      Parameters:
      menu - The menu to force icons to show.
    • setViewItemsTint

      public static void setViewItemsTint(@NonNull View view, @ColorInt int color, @ColorInt int background, boolean tint)
      Set other items color of this view according to the supplied values.

      Generally, it should be a tint color so that items will be visible on this view background.

      Parameters:
      view - The view to set its items color.
      color - The tint color to be applied.
      background - The background color for the tooltip.
      tint - true to tint views according to the supplied parameters.
    • setViewItemsTint

      public static void setViewItemsTint(@NonNull View view, @ColorInt int color, @ColorInt int background)
      Set other items color of this view according to the supplied values.

      Generally, it should be a tint color so that items will be visible on this view background.

      Parameters:
      view - The view to set its items color.
      color - The tint color to be applied.
      background - The background color for the tooltip.