Copyright 2010-2017 Obihai Technology, Inc.
142
bordercolor, hidden
If an attribute is not specified in <style>, it inherits the value from the
same attribute in <SoftKeyStyles>
<label>
Optional: width, height,
xpos, ypos, font, size,
textcolor, align, valign,
hidden
This optional child element of <style> specifies the style to render the
label (text) of the soft key. It inherts the following attributes from its
ancestors: font, size, textcolor
<icon>
Optional: width, height,
xpos, ypos, font, size,
textcolor, align, valign,
hidden,src
This optional child element of <style> specifies the style to render the
icon of the soft key.
Attributes in a <SoftKeyStyles> XML
Attribute
Elements
Description
xpos
<SoftKeyStyles>,
<style>, <label>, <icon>
x position of the upper left corner pixel of the bounding box within the
parent bounding box
ypos
<SoftKeyStyles>,
<style>, <label>, <icon>
y position of the upper left corner pixel of the bounding box within the
parent bounding box
align
<label>, <icon>
Horizontal alignment of the widget within its own bounding box. Note
that the bound
ing box’s own location within its parent bounding box is
determined by the xpos and ypos attributes
valign
<label>, <icon>
Vertical alignment of the widget within its own bounding box
width
<SoftKeyStyles>,
<style>, <label>, <icon>
Width of the bounding box
height
<SoftKeyStyles>,
<style>, <label>, <icon>
Height of the bounding box
bgcolor
<SoftKeyStyles>,
<style>
Background color or color pattern. Note that if bgimg is specified and
available, it will cover the background color.
Example:
<style bgimg="" hlimg="" hlcolor="black"
bgcolor="$eval($alert?{red,black,1}:{white,black,1})">
Note that in the example we set bgimg and hlimg to empty string to
remove overwrite the default bgimg or hlimg, otherwise the bgcolor and
hlcolor will be covered.
hlcolor
<SoftKeyStyles>,
<style>
Background color or color pattern when the key is highlighted or
pressed. Note that if hlimg is specified and available, it will cover the
background color when the key is hightlighted or pressed.
bgimg
<SoftKeyStyles>,
<style>
Background image. It can be an internal path or a http/https URL
hlimg
<SoftKeyStyles>,
<style>
Background image to show when the soft key is highlighted or pressed.
It can be an internal path or http/https URL
id
<style>
The ID to refer to this style in a custom soft key configuration
font
<SoftKeyStyles>,
<style>, <label>
Text font (the value must be either "@gfont" or "@gfont-bold")
size
<SoftKeyStyles>,
<style>, <label>
Text size.
textcolor
<SoftKeyStyles>,
<style>, <label>
Text color
border
<SoftKeyStyles>,
<style>
The default is “
0
” means no border around the bounding box. “n” means
a border of n-pixel around the bounding box
bordercolor
<SoftKeyStyles>,
<style>
The color of the border to draw around the bounding box of the widget
src
<icon>
Ov
erwrites the soft key icon’s file path or URL