Files in the sample application
LocalizationDemo.java
This file defines the LocalizationDemo class , the LocalizationDemoScreen class, and the InfoScreen class.
The LocalizationDemo class extends the UiApplication class, and contains the following constructor and methods:
- main(String[ ] args) : contains a new instance of the application named theApp, provides the entry point to the sample application, and starts the main thread using theApp.enterEventDispatcher( )
- LocalizationDemo() : constructs a new LocalizationDemo object and pushes a LocalizationDemoScreen object on to the display stack
The LocalizationDemoScreen class extends the MainScreen class, and implements the LocalizationDemoResource and FieldChangeListener interfaces. It contains the following constructor and methods:
- LocalizationDemoScreen() : initializes the screen by creating the RichTextField, SeparatorField, and LabelField objects
- fieldChanged(Field field, int context) : implementation of the FieldChangeListener interface listens for a BlackBerry® device user to select a locale and displays the menu when the ObjectChoiceField changes
The InfoScreen class extends MainScreen, implements LocalizationDemoResource and displays the information for the currently selected locale.
Resource filesNext topic: System requirements
Previous topic: Featured interfaces