Understanding the Strings.xml file

The Strings.xml file is used to control what is printed on the device, including user interface labels, messages, logos, icons, and other graphics. This is the primary file used to customize the Unwired Accelerator .NET client. Resource names and values in the file equate to text or visual cues displayed on the screen.

Figure B-1 shows several resource names and values, and the equivalent PDA screen representation.

Figure B-1: Resource names and PDA screen equivalents

Following is a partial, sample Strings.xml file, with key resource names highlighted. See Table B-2 for descriptions of these resource names.

<?xml version="1.0" encoding="utf-8" ?>
<root>
<Resource Name="TITLE_APPLICATION" Value="Unwired Accelerator" />
<Resource Name="FORMAT_DISPLAY_TEXT_RTL" Value="false" />
<Resource Name="FORMAT_FONT" Value="Arial" />
<Resource Name="FORMAT_LAST_DOWNLOAD_DATE_FORMAT" Value="yyyy-MM-dd hh:mm:ss" />
<Resource Name="FORMAT_LIST_VIEW_ROW_HEIGHT_FOR_DPI_96" Value="16" />
<Resource Name="FORMAT_LIST_VIEW_ROW_HEIGHT_FOR_DPI_192" Value="32" />
...
<Resource Name="MESSAGE_ASA_NOT_FOUND" Value="Adaptive Server Anywhere for Windows CE could not be found. This application will now exit." />
<Resource Name="MESSAGE_CAN_NOT_ACCESS_APPLICATION_DATA" Value="Unable to access Application data." />
<Resource Name="MESSAGE_CAN_NOT_CREATE_NEW_APPLICATION" Value="Can not create new Application." />
<Resource Name="MESSAGE_CAN_NOT_READ_PROFILE" Value="Can not read Profile." />
...
<Resource Name="STRING_ABORT" Value="Abort" />
<Resource Name="STRING_*ALL_COLUMNS*" Value="ALL COLUMNS" />
<Resource Name="STRING_APPLICATIONS" Value="Applications" />
...
<Resource Name="IMAGE_ADD_MOUSEUP_24" Value="add_white_24.bmp" />
<Resource Name="IMAGE_ADD_MOUSEDOWN_24" Value="add_black_24.bmp" />
<Resource Name="IMAGE_ADD_DISABLED_24" Value="add_disabled_24.bmp" />
...
</Root>
Table B-2: Resource names in Strings.xml

Resource name

Description

Default value

encoding

Character encoding for Unicode. The default, UTF-8, is ideal for mobile device applications.

utf-8

TITLE_APPLICATION

The default application name for Unwired Accelerator that displays on the mobile device.

Unwired Accelerator

FORMAT_DISPLAY_TEXT_RTL

Indicates whether application text displays right to left on the mobile device. False indicates text displays left to right; true indicates text displays right to left.

false

FORMAT_FONT

The default application font used on the mobile device.

Arial

FORMAT_LAST_DOWNLOAD_DATE_ FORMAT

The date-time format used on the mobile device.

yyyy-MM-dd hh:mm:ss

FORMAT_LIST_VIEW_ROW_HEIGHT_FOR_DPI_96

The row height in pixels for 96 dots-per-inch (DPI).

16

FORMAT_LIST_VIEW_ROW_HEIGHT_FOR_DPI_192

The row height in pixels for 192 DPI.

32

MESSAGE_message_text

Message text, such as “Can not read Profile.” You can modify or localize each message.

See Table B-3 for additional information about the messages.

STRING_string_text

Application labels, such as “Profile Name.” You can modify or localize each message. See Figure B-1 for several string examples.

See Table B-4 for additional information about the user interface strings.

IMAGE_image_name

Application images, such as buttons, graphics, and logos. Many images are provided in normal, selected, or unavailable style, and multiple sizes of images are available, depending on the mobile device window dimensions.

See Table B-5 for additional information about images.