HP Anywhere 10.02 API Reference
Show:

HPA.ActionsBar Class

Module: HPA

Available since HP Anywhere 10.01

[Smartphone Edition]

Customize the Actions bar in an app.

Use this API to dynamically:

  • add an Action button
  • show/hide the Actions bar
  • override the existing set of buttons
  • add additional options to the More menu

Methods

setActions

(
  • items
)

Add customized items to the Actions bar, such as a list of menu options or a single button.

Parameters:

  • items Array

    action items

    Usage example:

     Note: When adding a button, the icon property must be one of the following: Add, Attach, Delete, Edit, Photo, Remove, Save, Search, Store
    
      HPA.ActionsBar.setActions([
                 {   icon: 'Add', action: "defaultAction", params: "add"},
                 {   text: "About", action: "moreAction", params: "Create, edit and view events" },
                 {   text: "Do something", action: "moreAction", params: "Did something..." }
             ]
    
    
    
      HPA.ActionsBar.setActions([
      {   text: "Share", action: "barAction", params: "share" }
      ]);
    

setVisible

(
  • visible
)

Hide/show the Actions bar.

Parameters:

  • visible Boolean

    True/False Usage example: HPA.ActionsBar.setVisible(false);