Settings lists group together an application's user -configurable settings. They contain one or more settings items, each having a title and a value. Settings items may also have a sequence number and an indicator to show that they are compulsory, but this is optional. Figure 7-25 shows an example settings list with a number of items ”note that the player name is compulsory.
The types of settings item that can appear in a list are as follows :
Enumerated text (pop-up)
IP field editor
Password editor (numeric or alphabetic)
Unlike other lists, you can mix the types of item in a settings list. For example, a settings list for a game could contain a slider control to represent the difficulty level, a text editor to enter the player name and a binary switch to determine whether hints are shown or not.
You can adjust the value of an item by selecting it with the Selection key, or by invoking Change from the Options menu. On selection of the item, a settings page will usually display to allow the value to be changed. You will see how the framework determines whether to display a settings page when you go through the examples. The exact appearance of the settings page will depend on the type of settings item you are adjusting. It will have a title and a control, which you can use to adjust the value of the item. Optionally, it may have a number and some hint text, describing what the user should do to adjust the value. An example settings page is shown in Figure 7-26.
The soft keys for the settings page are usually labeled Ok and Back . However, it is possible to change them programmatically ”for example, to allow an Options menu. Once you have adjusted the value of the settings page item, if you select a positive soft key, such as Ok , it saves the value.
For some items, such as the binary switch, the settings list will not always use a settings page for editing the item. In this case, the value will be edited in-place ”when the Selection key is pressed, the binary switch will toggle between the on and off values.