java.lang.Object | |
↳ | net.pierrox.lightning_launcher.script.api.Menu |
Provides an access to the popup menu, so that it can be customized.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | MODE_APP_SHORTCUTS | The app shortcuts menu (Android 7.1+) | |||||||||
int | MODE_CONTAINER_CUSTOM | Custom container menu (populated with selected script entries) | |||||||||
int | MODE_CONTAINER_EM | Main container menu in edit mode | |||||||||
int | MODE_CONTAINER_NO_EM | Main container menu in normal mode (not edit mode) | |||||||||
int | MODE_CONTAINER_SUBMENU_ITEMS | ||||||||||
int | MODE_CONTAINER_SUBMENU_SCRIPTS | ||||||||||
int | MODE_CONTAINER_SUBMENU_SELECT | ||||||||||
int | MODE_CONTAINER_SUBMENU_SETTINGS | ||||||||||
int | MODE_ITEM_CUSTOM | Custom item menu (populated with selected script entries) | |||||||||
int | MODE_ITEM_EM | Main item menu in edit mode | |||||||||
int | MODE_ITEM_NO_EM | Main item menu in normal mode (not edit mode) | |||||||||
int | MODE_ITEM_SUBMENU_ACTION | The action sub menu (App info, Play Store, etc.) | |||||||||
int | MODE_ITEM_SUBMENU_EDIT | The edit sub menu (Select an icon, Edit label, etc.) | |||||||||
int | MODE_ITEM_SUBMENU_POSITION | The position sub menu (Detach from grid, Pin, etc.) | |||||||||
int | MODE_ITEM_SUBMENU_SCRIPTS | The scripts sub menu |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
View |
addMainItem(String text, Function action)
Add a main item, using the default style
| ||||||||||
void |
close()
Request this menu to be closed.
| ||||||||||
ViewGroup |
getMainItemsView()
Return the items container, where the main textual buttons can be found
| ||||||||||
int |
getMode()
Return the current menu mode.
| ||||||||||
ViewGroup |
getRootView()
Return the root view for the menu.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The app shortcuts menu (Android 7.1+)
Custom container menu (populated with selected script entries)
Main container menu in edit mode
Main container menu in normal mode (not edit mode)
Custom item menu (populated with selected script entries)
Main item menu in edit mode
Main item menu in normal mode (not edit mode)
The action sub menu (App info, Play Store, etc.)
The edit sub menu (Select an icon, Edit label, etc.)
The position sub menu (Detach from grid, Pin, etc.)
The scripts sub menu
Add a main item, using the default style
text | label to be displayed |
---|---|
action | called when the item is clicked, this must be a function with a single "view" argument |
Request this menu to be closed. This action is not automatically triggered when an item is clicked, it need to be done manually.
Return the items container, where the main textual buttons can be found
Return the current menu mode. The mode is one of the constants above and gives a hint on the context for which the menu is displayed
Return the root view for the menu. This view includes everything (title, icon buttons, main buttons)