Mobile Guide to BlackBerry

Now that you can launch an application, lets take a few moments and discuss the standard components, or fields, that make up most applications. These components are the building blocks for many of the applications in the BlackBerry handheld software and understanding how to work with them is an important step.

There are five main components that can appear in a BlackBerry application. They are

  • Menu Bringing up a menu for more actions

  • List Displays a list of items

  • Button A clickable button

  • Choice A short selectable list of values

  • Edit Field for entering text

One or more of these fields can appear together on a screen in any order. Because user input can only go to one field at a time, there is a field selector that is part of the screen as well. Only one field can be selected at a time. You can change the selected field by scrolling the trackwheel up or down. The input portion of the selected field is drawn in reverse, or if it is an edit field, a cursor appears in it. (The cursor is a little different than in your standard software application. Rather than a blinking line, it is a solid rectangle that moves as you input text.) Figure 2.2 shows a screen where the selected field is the Snooze field.

Figure 2.2. Toggle the Snooze field to On by clicking the trackwheel.

The next few sections take a closer look at each of the five main component types you'll find when working with BlackBerry applications.

MENUS

All BlackBerry applications display something and do something. The "do something" part is usually done by displaying a menu then reacting to the menu item you select. To display a menu in an open application, simply click the trackwheel. Not all applications use a menu, but if it does, this should display it. Figure 2.3 shows the Phone application menu as an example.

Figure 2.3. A menu being displayed.

While the menu is displayed, scrolling the trackwheel up and down moves the selection indicator up and down in the menu. The menu item that has been highlighted (or reversed to white, on black-and-white models) is the selected item.

tip

Some applications that have a specialized screen, such as the Home Screen, may use an Alt-click to display the menu.

The Hide Menu menu item is common to all application menus. Clicking this item causes the menu to close. You can also click the Escape key (located below the trackwheel) to close the menu display.

Menu items can be any action that the application can do and are not configurable by a user. Different menu items may be displayed, depending on conditions in the screen or what field is selected. For instance, in the Address Book application, if there are no contacts, the menu will show only a New Address menu item, and will not show Edit Address or Delete Address menu items because there are no items in the list to edit or delete. Selecting a menu item can also cause another menu to be displayed, but this is not a normal operation.

note

Some menus have different menu items depending on which item in the list is selected.

LISTS

Lists are some of the most common components used in applications that display a lot of information. For instance, the Messages application displays a list of messages. The list tends to be the only element on the screen because it usually can be added to and may grow to be bigger than the screen. When this happens it becomes scrollable. Figure 2.4 shows an example of a list. To change the selected item in the list, just scroll the trackwheel up or down.

Figure 2.4. Example of a list on the Messages screen.

If the list has more elements than can fit on a single screen, small arrows appear on the right side of the screen indicating that there are items above and/or below the screen.

tip

For lists that are very long, scrolling through the list one item at a time can be very painful. Fortunately, you can scroll the list one screen at a time by scrolling with the Alt key pressed in.

Another way to activate a button is to press the Enter key when the button is selected.

Some lists allow you to select more than a single item. Do this by holding the CAP key while scrolling the trackwheel.

BUTTONS

Buttons are not used as often as other components, but they have special behavior that should be addressed. As you would expect, a button can be clicked, which is done by clicking the trackwheel or pressing the Enter key. If the screen has a menu, clicking the trackwheel would normally display it. However, if a button is selected, clicking the trackwheel will "click" the button instead. Whatever action the button does is executed right away. This is basically the same as displaying the menu and selecting a menu item, so a button is used when a menu isn't the best way to trigger an actionwhich isn't often. Figure 2.5 shows a screen with a button labeled Preview.

Figure 2.5. An active (highlighted) button's action occurs as soon as you click the trackwheel.

CHOICE FIELDS

Choice fields are used in many applications where there is a small list of acceptable values. For instance, selecting a time display format would have only two acceptable values, "24 hour" and "12 hour." Not surprisingly, these are very common in configuration screens. Figure 2.6 is shows an example of a screen with a Choice field.

Figure 2.6. Example of a Choice field.

When working with a Choice field, there are two ways to switch the values. The first is through a menu labeled Change Option that is displayed automatically in the menu if the selected field is a Choice field.

Figure 2.7. Example of the Change Option menu item.

The second method is to hold down the Alt key while scrolling the trackwheel in a Choice field. Either method should display a small dialog with the short list of values allowing you to scroll through the list and click to select a value.

Figure 2.8. Choice fields have two or more options that you can select from.

If the Change Option menu was used, the selection can be made by either clicking the trackwheel or pressing the Enter key. Pressing the Escape key cancels the operation.

If the Alt+Scroll method was used, releasing the Alt key sets the selected value.

tip

Another way to change the value is to press the Space key with the Choice field selected. This will cause the selection to change to the next value.

EDIT FIELDS

Edit fields are used whenever there is a need to enter data that cannot be narrowed down to a choice. An example of an edit field is the address field of the Address Book or the Message field when composing a new message.

The Edit field has a number of properties that can be used to limit the type of information entered, such as the numeric only property which allows only numbers to be entered. Generally you will not notice these properties because they do not interfere with how you type in the information.

However, they can help you out in many ways to make entering text easier. In the example of the numeric only property, you do not have to use the Alt+char key combination: Simply pressing the key will cause the proper number to appear. Often people use this without even thinking about it. Fields that are used to collect web addresses or email addresses have special properties as well that will make the Space key automatically insert an "@" or "." character as appropriate.

If the Edit field already has text in it, you can scroll through the existing text by scrolling the trackwheel up and down. Notice that as you go up, the cursor stays in the same column if it can, but when scrolling down, the cursor jumps to the end of the text on each line. Moving the cursor to some text in the middle of the line can be tricky, but it's not impossible. Some newer devices have keys for moving right and left that are reached through the Alt key. If not, pressing and holding the Alt button while scrolling the trackwheel will move the cursor right and left also.

COPY AND PASTING

Edit fields also have the ability to cut/copy and paste. Only one bit of text can be copied at a time, but this can be a very useful feature. There are two ways to start the copy selection. If you display a menu while an Edit field is selected and that field has some text in it, a Select menu is shown. You can also press and hold the Shift key while scrolling the trackwheel. Once the copy selection has started, you can release the Shift key.

The same rules apply for moving the cursor as described previously, even the Alt+scroll rule. As you move the cursor around, all of the text between the starting cursor location and the current cursor location is highlighted as shown in Figure 2.9.

Figure 2.9. Some text selected in a message.

Once some text is selected, bringing up a menu shows new menu itemsCopy, Cut, and Cancel Selection. The Cut menu item is only shown if the Edit field you have selected text from is not read only. In this example, the message is read only, so no Cut menu item is shown in Figure 2.10.

Figure 2.10. The Copy menu once text has been selected.

Selecting the Cancel Selection menu item or pressing the Escape key will cancel the selection. Selecting the Copy menu item cancels the selection too, but the copied text is also placed in the clipboard. Selecting the Cut menu item removes the selected text and adds it to the clipboard. The text then stays in the clipboard until another copy selection is made.

Once some text is copied, a new Paste menu item shows up when the menu is displayed and an Edit field is selected. When the menu item is selected, the text in the clipboard is pasted into the Edit field at the current cursor location.

Figure 2.11. The Paste menu item is available once text has been copied.

SURETYPE AND MULTITAP

Because the 7100 series handhelds have more than one letter per key, there must be some way to make specific words from the series of keypresses that happens when a person types. There are actually two ways that you can do this. These are called SureType and MultiTap.

SureType is a method that uses a dictionary to make accurate guesses as to what word you are really wanting when you type. Using SureType, you only have to press each key you want once, and the software does the rest. For instance, if you press the keys, TY, GH, UI, and AS, the software would produce a guess of "THIS." It is able to do this because the other possible combinations of letters do not make words that are as common as "THIS." The words "THUS" and "THIA" would be offered as alternatives because they are either valid but less common words, or are the closest possible combination that could be part of another word. Figure 2.12 shows the word being entered and the possible alternatives under it.

Figure 2.12. The software provides a guess of "THIS" and lists other possible alternatives.

Notice that the word "THIS" is underlined. When the word is underlined, it means that the word is a guess given by the software. Scrolling the trackwheel up or down moves the selection indicator in the list of possible guesses below and changes the word on the edit field. Clicking the trackwheel or pressing the Space key accepts the selected word and resets the software to begin making guesses on the next word.

Sometimes you may not want to use SureType. If the word you want to enter is not in the dictionary, it may be difficult to get the software to make a proper guess. You may also not want to use SureType out of personal preference. In this case, you can turn off SureType (through configuration options or using a menu item) and switch to MultiTap mode.

When an edit field is in MultiTap mode, an "ABC" indicator is shown in the upper-right corner of the screen, as seen in Figure 2.13. Some fields, such as password fields, only work in MultiTap mode because showing the whole word without the password masking would be insecure.

Figure 2.13. When an Edit field is in MultiTap mode, a special indicator is shown in the upper- right corner of the screen.

To enter a word using MultiTap mode, you sometimes need to press a key more than once. Pressing a key with two characters on it will cause the left character to be shown. Pressing the same key again will cause the character to change to the other character on the key.

7100

Some fields are designed to only allow numbers to be entered, such as a phone number field. On these fields, a numeric indicator with the number "123" on it is shown in the upper-right corner. When this is shown, pressing any key will default to the number on the key instead of the letter.

For instance, pressing the ER key will first produce the E character. Pressing the ER key again quickly will change the E character to the R character. When a character is being entered, it is shown with an underline in the same way as when using SureType. This means the character can be changed by pressing the same key again. The character will only remain underlined for about a second, however, so you need to be quick about pressing the key again to change the character.

So, if we go back to our previous example, to type the word "THIS" in MultiType mode, you would have to press the keys TY, GH, GH, UI, UI, AS, AS. This means you have to do more keystrokes to enter the word, but it also means that you can be confident about the resulting word.

Категории