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 classPowerMenu.BuilderBuilder class for creating PowerMenu.
public abstract classPowerMenu.FactoryAn abstract factory class for creating an instance of PowerMenu.
A factory implementation class must have a non-argument constructor.
-
Field Summary
Fields Modifier and Type Field Description public CircularEffectcircularEffectpublic final OnMenuItemClickListener<E>onMenuItemClickListener
-
Method Summary
Modifier and Type Method Description voidsetTextColor(int color)sets the color of the default item text. voidsetMenuColor(int color)sets the color of the menu item color. voidsetSelectedTextColor(int color)sets the color of the selected item text. voidsetSelectedMenuColor(int color)sets the color of the selected menu item color. voidsetSelectedEffect(boolean selectedEffect)sets the selected effects what changing colors of the selected menu item. voidsetIconSize(int iconSize)sets an icon size of the menu item. voidsetIconColor(int iconColor)sets an icon color of the menu item. voidsetIconPadding(int iconPadding)sets a padding value between icon and menu item. voidsetTextSize(@Sp() int size)sets the size of the item text. voidsetTextGravity(int gravity)sets the android.view.Gravity of the item. voidsetTextTypeface(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
-
-
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.
-
setTextGravity
void setTextGravity(int gravity)
sets the android.view.Gravity of the item.
- Parameters:
gravity- gravity value.
-
setTextTypeface
void setTextTypeface(Typeface typeface)
sets the Typeface of the item.
- Parameters:
typeface- typeface value.
-
-
-
-