Copyright 2010-2017 Obihai Technology, Inc.
141
<SoftKeyStyles> XML
This is an XML document that specifies up to 32 styles that a custom soft key can be displayed with. Recall that a soft
key has 2 components that can be styled:
-
Label: The label (text) for the soft key
-
Icon: The icon for the soft key
In addition, the width, height, xpos, ypos, background color and image, and the border around the screen tile can also b
styled.
The root element is <SoftKeyStyles> which encloses up to 32 <style> element as shown in the below skeleton:
<SoftKeyStyles ...>
<style id="default" ...>
<label .../>
<icon .../>
</style>
...
<style id="xyz" ...>
<label .../>
<icon .../>
</style>
<SoftKeyStyles>
A Soft Key Window is a 120Wx34H-pixel area (80Wx34H on the OBi1022 and 200Wx60H on the OBi2000 series) evenly
spaced on the bottom of the screen. This window defines the root bounding box of each soft key. With <SoftKeyStyles>
you can define an area that is equal to or smaller than the root bounding box and place it anywhere within the root
bounding box (using the xpos, ypos, width and height attributes for the <SoftKeyStyles> or <style> elements). The
attributes defined in <SoftKeyStyles> are inherited by all the child <style> elements; each <style> element can define its
own set of attributes to overwrite the default values that are inherited.
Elements in a <SoftKeyStyles> XML
Elements
Attributes
Description
<SoftKeyStyles> Optional: bgimg, hlimg,
width, height, xpos,
ypos, font, size,
textcolor, border,
bordercolor
Root element that contains all the <style> elements. The attributes
define the default attribute values to use in each <style> element if they
are not specified in the <style>.
<style>
Required: id;
Optional: bgimg, hlimg,
width, height, xpos,
ypos, font, size,
textcolor, border,
Each <style> defines a style that can be referenced by id by a Soft Key
definition (via the style attribute) in a Soft Key Set parameter. A <style>
may be referenced by 0 to many Soft Keys. By default all Soft Keys
reference the <style> with the id "default" if the style attribute is not
specified in the soft key definition.