diff -r 913c9751c067 -r 716254ccbcc0 org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-775005BC-2FF8-45A9-BBA6-6CED6B5780A2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-775005BC-2FF8-45A9-BBA6-6CED6B5780A2.html Fri Mar 05 19:11:15 2010 -0800 @@ -0,0 +1,43 @@ + +Example widgets

Example widgets

+

This section provides you with example widgets that you can download into your PC and then into a mobile device or emulator. To download a widget, click the widget link below. When you click the widget link, you have the option of either viewing the contents of the widget package (Open) or downloading the package (Save).

+

+

STEW

The Simple Texting Example Widget (STEW) allows users to use a free social networking and micro-blogging service called Twitter on mobile devices. Users can send and read status updates, which are text-based posts of up to 140 characters in length. Status updates are displayed on the users' profile pages and delivered to other users who subscribe to them. Users can receive status updates through the Twitter Web site, SMS, RSS, e-mail, or an application such as Twitterrific, Facebook, or this example widget.

Figure: STEW main view

The STEW examples illustrate how to:

+

AccuWidget

AccuWidget is S60 Web Runtime (WRT) widget that allows users to check the current weather conditions and the forecast for the current and the following day. Special attention has been paid to the scalability in various screen resolutions and support for both keypad and touch UI.

Figure: AccuWidget location view

The AccuWidget example demonstrates the following features:

    +
  • Using the XMLHttpRequest API to transfer RSS (XML) data from a Web server. In this example, the AccuWeather service, www.accuweather.com.

  • +
  • Enabling navigation between different views.

  • +
  • Showing a transition effect when switching between views.

  • +
  • Scaling the screen size dynamically to fit different resolutions and orientations by modifying the CSS styles on the fly.

  • +
  • Changing the navigation mode between tab and cursor mode.

  • +
  • Capturing key events and creating a custom effect (highlighting) based on them.

  • +
  • Handling errors, such as no Internet connection and invalid input.

  • +
  • Hiding HTML elements that are irrelevant in the current view. For example, the right navigation arrow is hidden when there are no more forecasts to show.

  • +
  • Using a custom menu (from the WRT API) that is changed dynamically.

  • +

For the source file package, see the AccuWidget Example on Forum Nokia.

+

Keypad widget

The Keypad widget demonstrates capturing key events. By pressing different keys of the mobile keypad, you can see what key and character event codes are used in the Web Runtime environment.

+

Viewport widget

The Viewport widget demonstrates how to combine the JavaScript on resize DOM event handler with the height and width properties from the window and screen objects to calculate the effective area or viewport available for a widget.

+

Service widgets

The Service widgets demonstrate the use of S60 Platform Services through the JavaScript Service APIs provided by WRT 1.1.

+
\ No newline at end of file