Class DynamicMenuUtils
java.lang.Object
com.pranavpandey.android.dynamic.support.util.DynamicMenuUtils
Helper class to tint and perform operations on toolbar menu.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
forceMenuIcons
(Menu menu) Set the menu to show MenuItem icons in the overflow window.static void
setViewItemsTint
(View view, int color, int background) Set other items color of this view according to the supplied values.static void
setViewItemsTint
(View view, int color, int background, boolean tint) Set other items color of this view according to the supplied values.
-
Constructor Details
-
DynamicMenuUtils
public DynamicMenuUtils()
-
-
Method Details
-
forceMenuIcons
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.
-