Members
-
DatePicker
-
DatePicker is a html/js "widget" which will display all the days of a given month and allow selection of one specific day. It also implements controls to travel between months and jump into arbitrary time.
The DatePicker itself contains no UI for the controls.
Example usage:
// the container will have elements for the month // added and removed from it. var picker = new DatePicker(container);
// EVENTS:
// called when the user clicks a day in the calendar. picker.onvaluechange = function(date) {}
// called when the month of the calendar changes. // NOTE: at this time this can only happen programmatically // so there is only for control flow. picker.onmonthchange = function(date) {}
// display a given year/month/date on the calendar the month // is zero based just like the JS date constructor. picker.display(2012, 0, 2);
// move to the next month. picker.next();
// move to the previous month picker.previous();
-
LockScreen
-
LockScreen now use strategy pattern to adapt the unlocker, which would report intentions like unlocking and launching camera to finish the job.
- See:
- intentionRouter in the component.
-
SpinDatePicker
-
SpinDatePicker is a html/js "widget" which enables users pick a specific date. It display the date in the way based on the language setting.
The SpinDatePicker itself contains no UI for the controls.
Example usage:
// All necessary UI elements are contained in the root element. var picker = new SpinDatePicker(root); picker.value = new Date(); // after users pick a date var newDate = picker.value;
-
SystemScreen
-
System app is made of a top-level
<div ="screen"></div>
DOM element which contain all possible screens displayed by the app. Multiple screens can be displayed at a time. We store the list of currently visible screens into this DOM element class attribute. -
ValuePicker
-
base widget used in ValueSelector and SpinDatePicker widget
Methods
-
SystemDialog()
-
System app displays various kind of dialogs. A dialog is a system app 'screen' that has a high z-index and is used to be displayed on top of other apps. But it doesn't display over the status bar, nor the eventually displayed keyboard.
SystemDialog
except the dialog DOM Elementid
. This DOM Element has to have a DOM attribute 'role' set to 'dialog'.It also supports a second
options
object with following attributes:onHide
: function called when dialog is hidden, either whenhide()
method is called, or when dialog is automatically hidden on home button press
Type Definitions
-
ActivityConfig
-
Activity Config
Properties:
Name Type Description manifestURL String The manifestURL of the activity
url String The URL of the activity handling page
isActivity Boolean inline Boolean The disposition of the activty is inline or not
-
AppConfig
-
App Config
Properties:
Name Type Argument Default Description manifestURL String optional The manifestURL of the app
url String The URL of the activity handling page
origin String The origin of the app
stayBackground Boolean optional false This app is launched at background or not. Usually this means it's a request from system message.
changeURL Boolean optional false Need to change the URL of the running app or not. If it's true, we only change the URL when the app is not running at foreground.