Android Programming Press on the image to return to the main documentation page.

ModularMenu

Written by Giancarlo "Dominex" Fioretti

List of types:

ModularMenu

ModularMenu


This is an 'Activity Object', it cannot be declared under Sub Process_Globals.

Events:

Click
LongClick

Members:


  AddMenuItem (Title As String, Image As BitmapWrapper, EventName As String) As String

  AddMenuItemAt (Title As String, Image As BitmapWrapper, EventName As String, Position As Int) As String

  CloseMenu As String

  Initialize (MaxItemShow As Int, HeightItem As Int, Parent As ActivityWrapper, Module As Object) As String

  IsInitialized As Boolean

  KeyMenuPress As String

  LoadItem (MenuItem As List) As Boolean

  MenuLock As String

  MenuUnlock As String

  OpenMenu As String

  RemoveAll As Boolean

  RemoveAt (Index As Int) As Boolean

  SaveItem As List

  Size As Int

Members description:

AddMenuItem (Title As String, Image As BitmapWrapper, EventName As String) As String
Adds an item to the menu.
AddMenuItemAt (Title As String, Image As BitmapWrapper, EventName As String, Position As Int) As String
Adds an item to the menu in the specified position.
CloseMenu As String
Programmatically closes the menu.
Initialize (MaxItemShow As Int, HeightItem As Int, Parent As ActivityWrapper, Module As Object) As String
Initializes the ModularMenu.
MaxItemShow - maximum number of item visible in the menu without scrolling.
HeightItem - height of each item.
Parent - where is the Activity create the ModularMenu.
Module - must be Me

Example:
Menu.Initialize(7,43dip,Activity,Me)
IsInitialized As Boolean
Tests whether the object has been initialized.
KeyMenuPress As String
Action to be sent to the class by listening to the menu button press event.

Example:
Sub Activity_KeyPress (KeyCode As Int) As Boolean
  If KeyCode = KeyCodes.KEYCODE_MENU Then Menu.KeyMenuPress
End Sub
LoadItem (MenuItem As List) As Boolean
Upload the menu with the items on the List previously saved.
See the example Multi-Activity.
MenuLock As String
Locks the menu so that it can be opened until it is unlocked.
MenuUnlock As String
Unlock the menu so that it can re-open if it was previously locked.
OpenMenu As String
Programmatically opens the menu.
RemoveAll As Boolean
Removes all item from to menu.
RemoveAt (Index As Int) As Boolean
Removes the item at the specified position.
SaveItem As List
Passing in a list of the items stored in the menu.
See the example Multi-Activity.
Size As Int
Returns the number of item storeds in the list [read only].
Top