Class Index | File Index

Classes


Class UIControls


Defined in: phonegap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This class exposes mobile phone interface controls to JavaScript, such as native tab and tool bars, etc.
Method Summary
Method Attributes Method Name and Description
 
Create a native tab bar that can have tab buttons added to it which can respond to events.
 
createTabBarItem(name, title, image, options)
Create a new tab bar item for use on a previously created tab bar.
 
Create a toolbar.
 
hideTabBar(animate)
Hide a tab bar.
 
Manually select an individual tab bar item, or nil for deselecting a currently selected tab bar item.
 
Function called when a tab bar item has been selected.
 
showTabBar(options)
Show a tab bar.
 
showTabBarItems(options)
Show previously created items on the tab bar
 
Function called when a tab bar item has been selected.
 
updateTabBarItem(name, options)
Update an existing tab bar item to change its badge value.
Class Detail
UIControls()
This class exposes mobile phone interface controls to JavaScript, such as native tab and tool bars, etc.
Method Detail
createTabBar()
Create a native tab bar that can have tab buttons added to it which can respond to events.

createTabBarItem(name, title, image, options)
Create a new tab bar item for use on a previously created tab bar. Use ::showTabBarItems to show the new item on the tab bar. If the supplied image name is one of the labels listed below, then this method will construct a tab button using the standard system buttons. Note that if you use one of the system images, that the \c title you supply will be ignored. Tab Buttons - tabButton:More - tabButton:Favorites - tabButton:Featured - tabButton:TopRated - tabButton:Recents - tabButton:Contacts - tabButton:History - tabButton:Bookmarks - tabButton:Search - tabButton:Downloads - tabButton:MostRecent - tabButton:MostViewed
Parameters:
{String} name
internal name to refer to this tab by
{String} title Optional
title text to show on the tab, or null if no text should be shown
{String} image Optional
image filename or internal identifier to show, or null if now image should be shown
{Object} options Optional
Options for customizing the individual tab item - \c badge value to display in the optional circular badge on the item; if null or unspecified, the badge will be hidden

createToolBar()
Create a toolbar.

hideTabBar(animate)
Hide a tab bar. The tab bar has to be created first.
Parameters:
animate

selectTabBarItem(tabName)
Manually select an individual tab bar item, or nil for deselecting a currently selected tab bar item.
Parameters:
{String} tabName
the name of the tab to select, or null if all tabs should be deselected
See:
createTabBarItem
showTabBarItems

setToolBarTitle(title)
Function called when a tab bar item has been selected.
Parameters:
{String} title
the title to set within the toolbar

showTabBar(options)
Show a tab bar. The tab bar has to be created first.
Parameters:
{Object} options Optional
Options indicating how the tab bar should be shown: - \c height integer indicating the height of the tab bar (default: \c 49) - \c position specifies whether the tab bar will be placed at the \c top or \c bottom of the screen (default: \c bottom)

showTabBarItems(options)
Show previously created items on the tab bar
Parameters:
{String} arguments...
the item names to be shown
{Object} options Optional
dictionary of options, notable options including: - \c animate indicates that the items should animate onto the tab bar
See:
createTabBarItem
createTabBar

tabBarItemSelected(tag)
Function called when a tab bar item has been selected.
Parameters:
{Number} tag
the tag number for the item that has been selected

updateTabBarItem(name, options)
Update an existing tab bar item to change its badge value.
Parameters:
{String} name
internal name used to represent this item when it was created
{Object} options
Options for customizing the individual tab item - \c badge value to display in the optional circular badge on the item; if null or unspecified, the badge will be hidden

Documentation generated by JsDoc Toolkit 2.1.0 on Tue May 05 2009 14:44:46 GMT-0700 (PDT)