Development Guide
vfm.add(bitmapField2);
...
mainScreen.add(vfm)
Align a field to a line of text
You can create an application that can align a Field object to the natural beginning of a line of text by using the flag
Field.FIELD_LEADING. For example, if you create a Field with the alignment flag Field.FIELD_LEADING,
and add the Field to a VerticalFieldManager, if the application starts using either English or Chinese locales for
example, the Field aligns to the left side of the screen. If the application starts using either Arabic or Hebrew. locales, the
Field aligns to the right side of the screen.
UI events
Respond to UI navigation events
When you create a BlackBerry® device application, use the new Screen navigation methods and avoid using the
TrackwheelListener. If your existing BlackBerry device application implements the TrackwheelListener,
update your BlackBerry device application to use the new Screen navigation methods.
1.
Import the net.rim.device.api.ui.Screen class.
2.
Import the net.rim.device.api.system.TrackwheelListener interface.
3.
Manage navigation events by extending the net.rim.device.api.ui.Screen class (or one of its subclasses)
and overriding the following navigation methods:
navigationClick(int status, int time)
navigationUnclick(int status, int time)
navigationMovement(int dx, int dy, int status, int time)
Determine the type of input method
1.
Import one or more of the following classes:
• net.rim.device.api.ui.Screen
• net.rim.device.api.ui.Field
2.
Import the net.rim.device.api.system.KeypadListener interface.
3.
Implement the net.rim.device.api.system.KeypadListener interface.
4.
Extend the Screen class, the Field class, or both.
30
UI events