Class PowerMenu

  • All Implemented Interfaces:
    androidx.lifecycle.DefaultLifecycleObserver , androidx.lifecycle.LifecycleObserver , com.skydoves.powermenu.IMenuItem , com.skydoves.powermenu.IPowerMenuAdapter

    
    public class PowerMenu
    extends AbstractPowerMenu<E, T> implements IPowerMenuAdapter
                        

    PowerMenu is one the implementation of the AbstractPowerMenu.

    It implements the popup showing with the item selected effect by MenuListAdapter.

    PowerMenuItem is the member of the PowerMenu's list.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class PowerMenu.Builder

      Builder class for creating PowerMenu.

      public abstract class PowerMenu.Factory

      An abstract factory class for creating an instance of PowerMenu.

      A factory implementation class must have a non-argument constructor.

    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void setTextColor(int color) sets the color of the default item text.
      void setMenuColor(int color) sets the color of the menu item color.
      void setSelectedTextColor(int color) sets the color of the selected item text.
      void setSelectedMenuColor(int color) sets the color of the selected menu item color.
      void setSelectedEffect(boolean selectedEffect) sets the selected effects what changing colors of the selected menu item.
      void setIconSize(int iconSize) sets an icon size of the menu item.
      void setIconColor(int iconColor) sets an icon color of the menu item.
      void setIconPadding(int iconPadding) sets a padding value between icon and menu item.
      void setTextSize(@Sp() int size) sets the size of the item text.
      void setTextGravity(int gravity) sets the android.view.Gravity of the item.
      void setTextTypeface(Typeface typeface) sets the Typeface of the item.
      • Methods inherited from class com.skydoves.powermenu.AbstractPowerMenu

        addItem, addItem, addItemList, clearItems, clearPreference, dismiss, getAdapter, getCircularEffect, getContentViewHeight, getContentViewWidth, getFooterView, getHeaderView, getItemList, getListView, getMenuListView, getOnMenuItemClickListener, getPreferenceName, getPreferencePosition, getSelectedPosition, invokeOnMenuListener, isShowing, onCreate, onDestroy, onResume, onStart, removeItem, removeItem, setAnimation, setAnimationStyle, setAutoDismiss, setBackgroundAlpha, setBackgroundColor, setBackgroundSystemUiVisibility, setCircularEffect, setDismissIfShowAgain, setDivider, setDividerHeight, setFocusable, setFooterView, setFooterView, setFooterView, setHeaderView, setHeaderView, setHeaderView, setHeight, setIsClipping, setLifecycleOwner, setLifecycleOwnerFromContext, setListView, setMenuRadius, setMenuShadow, setOnBackgroundClickListener, setOnDismissedListener, setOnMenuItemClickListener, setPadding, setPreferencePosition, setSelectedPosition, setSelection, setShowBackground, setTouchInterceptor, setWidth, showAsAnchorCenter, showAsAnchorCenter, showAsAnchorLeftBottom, showAsAnchorLeftBottom, showAsAnchorLeftTop, showAsAnchorLeftTop, showAsAnchorRightBottom, showAsAnchorRightBottom, showAsAnchorRightTop, showAsAnchorRightTop, showAsDropDown, showAsDropDown, showAtCenter, showAtCenter, showAtLocation, showAtLocation
      • Methods inherited from class com.skydoves.powermenu.IMenuItem

        addItem, addItem, addItemList, getItemList, removeItem
      • Methods inherited from class androidx.lifecycle.DefaultLifecycleObserver

        onCreate, onDestroy, onPause, onResume, onStart, onStop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • setTextColor

         void setTextColor(int color)

        sets the color of the default item text.

        Parameters:
        color - color value.
      • setMenuColor

         void setMenuColor(int color)

        sets the color of the menu item color.

        Parameters:
        color - color value.
      • setSelectedTextColor

         void setSelectedTextColor(int color)

        sets the color of the selected item text.

        Parameters:
        color - color value.
      • setSelectedMenuColor

         void setSelectedMenuColor(int color)

        sets the color of the selected menu item color.

        Parameters:
        color - color value.
      • setSelectedEffect

         void setSelectedEffect(boolean selectedEffect)

        sets the selected effects what changing colors of the selected menu item.

        Parameters:
        selectedEffect - enable or unable.
      • setIconSize

         void setIconSize(int iconSize)

        sets an icon size of the menu item.

        Parameters:
        iconSize - icon size of the menu item.
      • setIconColor

         void setIconColor(int iconColor)

        sets an icon color of the menu item.

        Parameters:
        iconColor - icon color of the menu item.
      • setIconPadding

         void setIconPadding(int iconPadding)

        sets a padding value between icon and menu item.

        Parameters:
        iconPadding - padding value between icon and menu item.
      • setTextSize

         void setTextSize(@Sp() int size)

        sets the size of the item text.

        Parameters:
        size - size value.